chore(docs): Generated References (automated) (#12154)

Generated the following references:
- `api_key`
- `auth`
- `cart`
- `cart_models`
- `core_flows`
- `currency`
- `customer`
- `event`
- `file_service`
- `fulfillment`
- `fulfillment_provider`
- `inventory_next`
- `js_sdk`
- `locking`
- `medusa`
- `modules`
- `modules_sdk`
- `notification_service`
- `order`
- `payment`
- `payment_provider`
- `pricing`
- `product`
- `promotion`
- `region`
- `sales_channel`
- `stock_location_next`
- `store`
- `tax`
- `types`
- `user`
- `utils`
- `workflows`

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
This commit is contained in:
authored and GitHub committed 2025-04-11 11:15:08 +00:00
1 parent df5d410be2
commit 94e98190ff
1790 files changed
+220057 -187216

No files matched your search

@@ -212,7 +212,7 @@ sdk.admin.apiKey.batchSalesChannels("apk_123", {
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The API key's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The sales channels to add or remove from the API key.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchSalesChannels"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The API key's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The sales channels to add or remove from the API key.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchSalesChannels"/>
### Returns
@@ -188,9 +188,21 @@ This method manages the promotions of a campaign to either add or remove the ass
It sends a request to the [Manage Promotions](https://docs.medusajs.com/api/admin#campaigns\_postcampaignsidpromotions)
API route.
### Example
```ts
sdk.admin.campaign.batchPromotions("procamp_123", {
add: ["prom_123", "prom_456"],
remove: ["prom_789"]
})
.then(({ campaign }) => {
console.log(campaign)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The campaign's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The promotions to add or remove associations to them.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPromotions"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The campaign's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The promotions to add or remove associations to them.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPromotions"/>
### Returns
@@ -129,7 +129,7 @@ sdk.admin.claim.create({
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim and order's details.","expandable":false,"children":[{"name":"order","type":"[OrderDTO](../../../../../fulfillment/interfaces/fulfillment.OrderDTO/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The version of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx)","description":"The status of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The subtotal of the order. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The discount subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The discount total of the order.","optional":false,"defaultValue":"","expandable":false,"childrLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim and order's details.","expandable":false,"children":[{"name":"order","type":"[OrderDTO](../../../../../fulfillment/interfaces/fulfillment.OrderDTO/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The version of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx)","description":"The status of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The subtotal of the order. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The discount subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The discount total of the order.","optional":false,"defaultValue":"","expandable":false,"childrLine truncated
___
@@ -184,7 +184,7 @@ sdk.admin.claim.addItems("claim_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
___
@@ -217,7 +217,7 @@ sdk.admin.claim.updateItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
___
@@ -248,7 +248,7 @@ sdk.admin.claim.removeItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
___
@@ -284,7 +284,7 @@ sdk.admin.claim.addInboundItems(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":falseLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":falseLine truncated
___
@@ -318,7 +318,7 @@ sdk.admin.claim.updateInboundItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
___
@@ -349,7 +349,7 @@ sdk.admin.claim.removeInboundItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
___
@@ -382,7 +382,7 @@ sdk.admin.claim.addInboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
___
@@ -416,7 +416,7 @@ sdk.admin.claim.updateInboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
___
@@ -447,7 +447,7 @@ sdk.admin.claim.deleteInboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
___
@@ -480,7 +480,7 @@ sdk.admin.claim.addOutboundItems(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
___
@@ -514,7 +514,7 @@ sdk.admin.claim.updateOutboundItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
___
@@ -545,7 +545,7 @@ sdk.admin.claim.removeOutboundItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
___
@@ -579,7 +579,7 @@ API route.
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
___
@@ -613,7 +613,7 @@ sdk.admin.claim.updateOutboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
___
@@ -642,7 +642,7 @@ sdk.admin.claim.deleteOutboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
___
@@ -670,7 +670,7 @@ sdk.admin.claim.request(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimRequestResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimRequestResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim and its associated return, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimRequestResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimRequestResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim and its associated return, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[Line truncated
___
@@ -122,7 +122,7 @@ ___
## retrieve
This method retrieves a customer by its ID. It sends a request to the
This method retrieves a customer by its ID. It sends a request to the
[Get Customer](https://docs.medusajs.com/api/admin#customers\_getcustomersid)
API route.
@@ -162,7 +162,7 @@ ___
## delete
This method deletes a customer by its ID. It sends a request to the
This method deletes a customer by its ID. It sends a request to the
[Delete Customer](https://docs.medusajs.com/api/admin#customers\_deletecustomersid)
API route.
@@ -205,8 +205,143 @@ sdk.admin.customer.batchCustomerGroups("cus_123", {
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The groups to add customer to or remove customer from.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomerGroups"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The groups to add customer to or remove customer from.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomerGroups"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customers details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomerGroups"/>
___
## createAddress
This method creates a customer address. It sends a request to the
[Create Customer Address](https://docs.medusajs.com/api/admin#customers\_postcustomersidaddresses)
API route.
### Example
```ts
sdk.admin.customer.createAddress("cus_123", {
address_1: "123 Main St",
city: "Anytown",
country_code: "US",
postal_code: "12345"
})
.then(({ customer }) => {
console.log(customer)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminCreateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCustomerAddress/page.mdx)","description":"The customer address's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createAddress"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customer address's details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createAddress"/>
___
## updateAddress
This method updates a customer address. It sends a request to the
[Update Customer Address](https://docs.medusajs.com/api/admin#customers\_postcustomersidaddressesaddressid)
API route.
### Example
```ts
sdk.admin.customer.updateAddress("cus_123", "cus_addr_123", {
address_1: "123 Main St",
city: "Anytown",
country_code: "US",
postal_code: "12345"
})
.then(({ customer }) => {
console.log(customer)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"The customer address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateCustomerAddress/page.mdx)","description":"The customer address's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateAddress"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customer address's details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateAddress"/>
___
## deleteAddress
This method deletes a customer address. It sends a request to the
[Delete Customer Address](https://docs.medusajs.com/api/admin#customers\_deletecustomersidaddressesaddressid)
API route.
### Example
```ts
sdk.admin.customer.deleteAddress("cus_123", "cus_addr_123")
.then(({ customer }) => {
console.log(customer)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"The customer address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteAddress"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customer address's details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteAddress"/>
___
## retrieveAddress
This method retrieves a customer address by its ID. It sends a request to the
[Get Customer Address](https://docs.medusajs.com/api/admin#customers\_getcustomersidaddressesaddressid)
API route.
### Example
```ts
sdk.admin.customer.retrieveAddress("cus_123", "cus_addr_123")
.then(({ customer }) => {
console.log(customer)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"The customer address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveAddress"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customer address's details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveAddress"/>
___
## listAddresses
This method retrieves a list of customer addresses. It sends a request to the
[List Customer Addresses](https://docs.medusajs.com/api/admin#customers\_getcustomersidaddresses)
API route.
### Example
```ts
sdk.admin.customer.listAddresses("cus_123")
.then(({ addresses }) => {
console.log(addresses)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAddresses"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of customer addresses.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAddresses"/>
@@ -206,7 +206,7 @@ sdk.admin.customerGroup.batchCustomers("cusgroup_123", {
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The group's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The customers to add or remove from the group.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomers"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The group's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The customers to add or remove from the group.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomers"/>
### Returns
@@ -24,7 +24,7 @@ API route.
To retrieve a draft order by its ID:
```ts
sdk.admin.draftOrder.retrieve("draft_order_123")
sdk.admin.draftOrder.retrieve("order_123")
.then(({ draft_order }) => {
console.log(draft_order)
})
@@ -33,7 +33,7 @@ sdk.admin.draftOrder.retrieve("draft_order_123")
To specify the fields and relations to retrieve:
```ts
sdk.admin.draftOrder.retrieve("draft_order_123", {
sdk.admin.draftOrder.retrieve("order_123", {
fields: "id,*items"
})
.then(({ draft_order }) => {
@@ -49,7 +49,7 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The draft order's details.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","tLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The draft order's details.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"The details of the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]}Line truncated
___
@@ -103,7 +103,7 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of draft orders.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_orders","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of draft orders.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_orders","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)[]","description":"The list of draft orders.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the orLine truncated
___
@@ -126,7 +126,7 @@ sdk.admin.draftOrder.create({
},
],
region_id: "region_123",
sales_channel_id: "sales_channel_123",
sales_channel_id: "sc_123",
})
.then(({ draft_order }) => {
console.log(draft_order)
@@ -135,11 +135,11 @@ sdk.admin.draftOrder.create({
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateDraftOrder/page.mdx)","description":"The data to create the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region to associate the draft order with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The draft order's email.\n\nEither email or customer\\_id must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer to associate the draft order with.\n\nEither customer\\_id or email must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code to use for the draft order.\n\nIf not provided, the currency from the region will be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promo_codes","type":"`string`[]","description":"The promotions to apply to the draft order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","descrLine truncated
<TypeList types={[{"name":"body","type":"[AdminCreateDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateDraftOrder/page.mdx)","description":"The data to create the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel to associate the draft order with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region to associate the draft order with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The draft order's email.\n\nEither email or customer\\_id must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer to associate the draft order with.\n\nEither customer\\_id or email must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code to use for the draft order.\n\nIf not provided, the currency from the region will be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promo_codes","type":"`string`[]","description":"The promotions to apply to the draft order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method creates a draft order. It sends a request to the\n[Create Draft Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftorders) API route.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order inclLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method creates a draft order. It sends a request to the\n[Create Draft Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftorders) API route.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"The details of the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","descriptioLine truncated
___
@@ -153,7 +153,7 @@ This method updates a draft order. It sends a request to the
To update a draft order:
```ts
sdk.admin.draftOrder.update("draft_order_123", {
sdk.admin.draftOrder.update("order_123", {
email: "test@test.com",
})
.then(({ draft_order }) => {
@@ -163,8 +163,399 @@ sdk.admin.draftOrder.update("draft_order_123", {
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrder/page.mdx)","description":"The data to update the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The draft order's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The draft order's metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminDraftOrderParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderParams/page.mdx)","description":"Configure the fields to retrieve in the draft order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","deLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrder/page.mdx)","description":"The data to update the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The draft order's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer to associate the draft order with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel to associate the draft order with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The draft order's metadata.","optionLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates a draft order. It sends a request to the\n[Update Draft Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftordersid) API route.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order inLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates a draft order. It sends a request to the\n[Update Draft Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftordersid) API route.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"The details of the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","descriptLine truncated
___
## convertToOrder
This method converts a draft order to an order. It sends a request to the
[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidconvert-to-order) API route.
### Example
To convert a draft order to an order:
```ts
sdk.admin.draftOrder.convertToOrder("order_123")
.then(({ order }) => {
console.log(order)
})
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminDraftOrderParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderParams/page.mdx)","description":"Configure the fields to retrieve in the order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="convertToOrder"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method converts a draft order to an order. It sends a request to the\n[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftordersidconvert-to-order) API route.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","descriLine truncated
___
## addItems
This method adds items to a draft order. It sends a request to the
[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditems) API route.
### Example
To add items to a draft order:
```ts
sdk.admin.draftOrder.addItems("order_123", {
items: [
{
variant_id: "variant_123",
quantity: 1,
},
],
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddDraftOrderItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddDraftOrderItems/page.mdx)","description":"The data to add the items to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminAddDraftOrderItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddDraftOrderItem/page.mdx)[]","description":"The items to add to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The item's variant ID.\n\nEither variant\\_id or title must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The item's title.\n\nEither variant\\_id or title must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`null` \\| `number`","description":"The item's unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"`null` \\| `number`","description":"The item's compare at unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"The item's internal note.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The item's metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addItems"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method adds items to a draft order. It sends a request to the\n[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsiditems) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items inclLine truncated
___
## updateActionItem
This method updates an item that is part of an action in a draft order. It sends a request to the
[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditemsaction\_id) API route.
### Example
To update an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.updateActionItem("order_123", "action_123", {
quantity: 2,
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The action ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderItem/page.mdx)","description":"The data to update the item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`null` \\| `number`","description":"The item's unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"`null` \\| `number`","description":"The item's compare at unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"The item's internal note.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The item's metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates an item that is part of an action in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsiditemsaction\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","descrLine truncated
___
## removeActionItem
This method removes an item that is part of an action in a draft order. It sends a request to the
[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsiditemsaction\_id) API route.
### Example
To remove an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.removeActionItem("order_123", "action_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The action ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method removes an item that is part of an action in a draft order. It sends a request to the\n[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\\_deleteordereditsiditemsaction\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","desLine truncated
___
## updateItem
This method updates an item in a draft order. It sends a request to the
[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditemsitem\_id) API route.
### Example
To update an item in a draft order:
```ts
sdk.admin.draftOrder.updateItem("order_123", "item_123", {
quantity: 2,
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemId","type":"`string`","description":"The item ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderItem/page.mdx)","description":"The data to update the item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`null` \\| `number`","description":"The item's unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"`null` \\| `number`","description":"The item's compare at unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"The item's internal note.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The item's metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates an item in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsiditemsitem\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the orLine truncated
___
## addPromotions
This method adds promotions to a draft order. It sends a request to the
[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidpromotions) API route.
### Example
To add promotions to a draft order:
```ts
sdk.admin.draftOrder.addPromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddDraftOrderPromotions](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddDraftOrderPromotions/page.mdx)","description":"The data to add the promotions to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"promo_codes","type":"`string`[]","description":"The promotion codes to apply to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addPromotions"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method adds promotions to a draft order. It sends a request to the\n[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidpromotions) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the ordLine truncated
___
## removePromotions
This method removes promotions from a draft order. It sends a request to the
[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsidpromotions) API route.
### Example
To remove promotions from a draft order:
```ts
sdk.admin.draftOrder.removePromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminRemoveDraftOrderPromotions](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRemoveDraftOrderPromotions/page.mdx)","description":"The data to remove the promotions from the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"promo_codes","type":"`string`[]","description":"The promotion codes to remove from the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removePromotions"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method removes promotions from a draft order. It sends a request to the\n[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\\_deleteordereditsidpromotions) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total Line truncated
___
## addShippingMethod
This method adds a shipping method to a draft order. It sends a request to the
[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methods) API route.
### Example
To add a shipping method to a draft order:
```ts
sdk.admin.draftOrder.addShippingMethod("order_123", {
shipping_option_id: "shipping_option_123",
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddDraftOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddDraftOrderShippingMethod/page.mdx)","description":"The data to add the shipping method to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"Description of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"Internal note for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Metadata for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethod"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method adds a shipping method to a draft order. It sends a request to the\n[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidshipping-methods) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"ThLine truncated
___
## updateActionShippingMethod
This method updates a shipping method in a draft order. It sends a request to the
[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methodsaction\_id) API route.
### Example
To update a shipping method in a draft order:
```ts
sdk.admin.draftOrder.updateShippingMethod("order_123", "action_123", {
shipping_option_id: "shipping_option_123",
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The action ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderActionShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderActionShippingMethod/page.mdx)","description":"The data to update the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`null` \\| `number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"Description of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"Internal note for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Metadata for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionShippingMethod"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates a shipping method in a draft order. It sends a request to the\n[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidshipping-methodsaction\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`",Line truncated
___
## removeActionShippingMethod
This method removes a shipping method from a draft order. It sends a request to the
[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsidshipping-methodsaction\_id) API route.
### Example
To remove a shipping method from a draft order:
```ts
sdk.admin.draftOrder.removeShippingMethod("order_123", "action_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The action ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionShippingMethod"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method removes a shipping method from a draft order. It sends a request to the\n[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\\_deleteordereditsidshipping-methodsaction\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`numbeLine truncated
___
## updateShippingMethod
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methodId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderShippingMethod/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"Internal note for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingMethod"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the ordeLine truncated
___
## beginEdit
This method begins an edit to a draft order. It sends a request to the
[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsid) API route.
### Example
To begin an edit to a draft order:
```ts
sdk.admin.draftOrder.beginEdit("order_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="beginEdit"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method begins an edit to a draft order. It sends a request to the\n[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsid) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items inclLine truncated
___
## cancelEdit
This method cancels an edit to a draft order. It sends a request to the
[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsid) API route.
### Example
To cancel an edit to a draft order:
```ts
sdk.admin.draftOrder.cancelEdit("order_123")
.then(({ id, object, deleted }) => {
console.log(id, object, deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelEdit"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.DeleteResponse/page.mdx)&#60;\"draft-order-edit\"&#62;&#62;","optional":false,"defaultValue":"","description":"This method cancels an edit to a draft order. It sends a request to the\n[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\\_deleteordereditsid) API route.","expandable":false,"children":[{"name":"\"draft-order-edit\"","type":"`\"draft-order-edit\"`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelEdit"/>
___
## requestEdit
This method requests an edit to a draft order. It sends a request to the
[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidrequest) API route.
### Example
To request an edit to a draft order:
```ts
sdk.admin.draftOrder.requestEdit("order_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="requestEdit"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method requests an edit to a draft order. It sends a request to the\n[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidrequest) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order'sLine truncated
___
## confirmEdit
This method confirms an edit to a draft order. It sends a request to the
[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidconfirm) API route.
### Example
To confirm an edit to a draft order:
```ts
sdk.admin.draftOrder.confirmEdit("order_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmEdit"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method confirms an edit to a draft order. It sends a request to the\n[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidconfirm) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order'sLine truncated
@@ -186,7 +186,7 @@ sdk.admin.exchange.addInboundItems("exchange_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
___
@@ -222,7 +222,7 @@ sdk.admin.exchange.updateInboundItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
___
@@ -255,7 +255,7 @@ sdk.admin.exchange.removeInboundItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
___
@@ -287,7 +287,7 @@ sdk.admin.exchange.addInboundShipping("exchange_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
___
@@ -323,7 +323,7 @@ sdk.admin.exchange.updateInboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
___
@@ -356,7 +356,7 @@ sdk.admin.exchange.deleteInboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
___
@@ -388,7 +388,7 @@ sdk.admin.exchange.addOutboundItems("exchange_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
___
@@ -424,7 +424,7 @@ sdk.admin.exchange.updateOutboundItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
___
@@ -457,7 +457,7 @@ sdk.admin.exchange.removeOutboundItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
___
@@ -486,7 +486,7 @@ sdk.admin.exchange.addOutboundShipping("exchange_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
___
@@ -522,7 +522,7 @@ sdk.admin.exchange.updateOutboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
___
@@ -555,7 +555,7 @@ sdk.admin.exchange.deleteOutboundShipping(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
___
@@ -581,7 +581,7 @@ sdk.admin.exchange.request("exchange_123", {})
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeRequestResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeRequestResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange and associated return's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"chLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeRequestResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeRequestResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange and associated return's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"chLine truncated
___
@@ -71,13 +71,22 @@ ___
## listFulfillmentOptions
This method retrieves a list of fulfillment options for a given fulfillment provider. It sends a request to the
[List Fulfillment Options](https://docs.medusajs.com/api/admin#fulfillment-providers\_getfulfillmentprovideroptions)
[List Fulfillment Options](https://docs.medusajs.com/api/admin#fulfillment-providers\_getfulfillmentprovidersidoptions)
API route.
### Example
```ts
sdk.admin.fulfillmentProvider.listFulfillmentOptions("fp_123")
.then(({ fulfillment_options }) => {
console.log(fulfillment_options)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listFulfillmentOptions"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminFulfillmentProviderOptionsListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProviderOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of fulfillment options.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_options","type":"[AdminFulfillmentProviderOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProviderOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment provider option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether the fulfillment provider option can be used for returns.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listFulfillmentOptions"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminFulfillmentProviderOptionsListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProviderOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of fulfillment options.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_options","type":"[AdminFulfillmentProviderOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProviderOption/page.mdx)[]","description":"The list of fulfillment options.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment provider option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether the fulfillment provider option can be used for returns.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listFulfillmentOptions"/>
@@ -52,7 +52,7 @@ sdk.admin.invite.accept(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminAcceptInviteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminAcceptInviteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The user's details.","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"The user's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"message","type":"`string`","description":"A message if an error occurs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="accept"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminAcceptInviteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminAcceptInviteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The user's details.","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"The user's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The user's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The user's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The user's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The URL of the user's avatar image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the user was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the user was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the user was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"message","type":"`string`","description":"A message if an error occurs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="accept"/>
___
@@ -49,7 +49,7 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -84,7 +84,7 @@ sdk.admin.order.update(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -108,7 +108,7 @@ sdk.admin.order.retrievePreview("order_123")
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order if the latest change, such as exchange, return, edit, or claim is applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","tyLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order if the latest change, such as exchange, return, edit, or claim is applied on it.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","tyLine truncated
___
@@ -187,7 +187,7 @@ sdk.admin.order.cancel("order_123")
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -215,7 +215,7 @@ sdk.admin.order.requestTransfer("order_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -240,7 +240,7 @@ sdk.admin.order.cancelTransfer("order_123")
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -272,7 +272,7 @@ sdk.admin.order.createFulfillment("order_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -303,7 +303,7 @@ sdk.admin.order.cancelFulfillment(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -339,7 +339,7 @@ sdk.admin.order.createShipment(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -367,7 +367,7 @@ sdk.admin.order.markAsDelivered(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
___
@@ -419,3 +419,15 @@ sdk.admin.order.listLineItems("order_123")
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderLineItemsListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminOrderLineItemsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of line items.","expandable":false,"children":[{"name":"order_items","type":"[AdminOrderItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderItem/page.mdx)[]","description":"The list of order items.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"order_id","type":"`string`","description":"The ID of the order that the item belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_id","type":"`string`","description":"The ID of the associated line item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order version that the item belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"history","type":"`object`","description":"The item's history details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)","description":"The associated line item's details.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listLineItems"/>
___
## createCreditLine
### Parameters
<TypeList types={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"Omit&#60;[CreateOrderCreditLineDTO](../../../../../order/interfaces/order.CreateOrderCreditLineDTO/page.mdx), \"order_id\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../../../order/types/order.BigNumberInput/page.mdx)","description":"The amount of the credit line.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../order/types/order.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reference","type":"`null` \\| `string`","description":"The reference model name that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`null` \\| `string`","description":"The reference model id that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the order detail","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCreditLine"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`number`","description":"TLine truncated
@@ -36,7 +36,7 @@ sdk.admin.orderEdit.initiateRequest({
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order edit's details.","expandable":false,"children":[{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The order edit's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim","type":"[AdminClaim](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaim/page.mdx)","description":"The claim's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_order","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange","type":"[AdminExchange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchange/page.mdx)","description":"The exchange's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actions","type":"[AdminOrderChangeAction](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChangeAction/page.mdx)[]","description":"The order change action's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The version of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_id","type":"`string`","description":"The ID of the associated return order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the associated exchange order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the associated claim order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderChangeStatus](../../../../../fulfillment/types/fulfillment.OrderChangeStatus/page.mdx)","description":"The status of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requested_by","type":"`null` \\| `string`","description":"The requested by of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requested_at","type":"`null` \\| `Date`","description":"When the order change was requested","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"confirmed_by","type":"`null` \\| `string`","description":"The confirmed by of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"confirmed_at","type":"`null` \\| `Date`","description":"When the order change was confirmed","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"declined_by","type":"`null` \\| `string`","description":"The declined by of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"declined_reason","type":"`null` \\| `string`","description":"The declined reason of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"declined_at","type":"`null` \\| `Date`","description":"When the order change was declined","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_by","type":"`null` \\| `string`","description":"The canceled by of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"When the order change was canceled","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the order change was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the order change was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"change_type","type":"`\"return\"` \\| `Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order edit's details.","expandable":false,"children":[{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The order edit's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim","type":"[AdminClaim](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaim/page.mdx)","description":"The claim's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_order","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange","type":"[AdminExchange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchange/page.mdx)","description":"The exchange's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actions","type":"[AdminOrderChangeAction](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChangeAction/page.mdx)[]","description":"The order change action's details.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The version of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the associated order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_id","type":"`string`","description":"The ID of the associated return order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the associated exchange order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the associated claim order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderChangeStatus](../../../../../fulfillment/types/fulfillment.OrderChangeStatus/page.mdx)","description":"The status of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requested_by","type":"`null` \\| `string`","description":"The requested by of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requested_at","type":"`null` \\| `Date`","description":"When the order change was requested","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"confirmed_by","type":"`null` \\| `string`","description":"The confirmed by of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"confirmed_at","type":"`null` \\| `Date`","description":"When the order change was confirmed","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"declined_by","type":"`null` \\| `string`","description":"The declined by of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"declined_reason","type":"`null` \\| `string`","description":"The declined reason of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"declined_at","type":"`null` \\| `Date`","description":"When the order change was declined","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_by","type":"`null` \\| `string`","description":"The canceled by of the order change","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`null` \\| `Date`","description":"When the order change was canceled","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the order change was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the order change was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"change_type","type":"`\"return\"` \\| `Line truncated
___
@@ -61,7 +61,7 @@ sdk.admin.orderEdit.request("ordch_123")
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
___
@@ -86,7 +86,7 @@ sdk.admin.orderEdit.confirm("ordch_123")
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
___
@@ -144,7 +144,7 @@ sdk.admin.orderEdit.addItems("ordch_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
___
@@ -175,7 +175,7 @@ sdk.admin.orderEdit.updateOriginalItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
___
@@ -211,7 +211,7 @@ sdk.admin.orderEdit.updateAddedItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
___
@@ -240,4 +240,4 @@ sdk.admin.orderEdit.removeAddedItem(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderEditPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderEditPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order preview's details.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the edit is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The totalLine truncated
@@ -0,0 +1,35 @@
---
slug: /references/js-sdk/admin/plugin
sidebar_label: plugin
tags:
- js sdk
- admin
- plugin
---
import { TypeList } from "docs-ui"
# plugin - JS SDK Admin Reference
This documentation provides a reference to the `sdk.admin.plugin` set of methods used to send requests to Medusa's Admin API routes.
## list
This method retrieves the list of plugins installed in a Medusa application.
### Example
```ts
sdk.admin.plugin.list()
.then(({ plugins }) => {
console.log(plugins)
})
```
### Parameters
<TypeList types={[{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPluginsListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPluginsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of plugins.","expandable":false,"children":[{"name":"plugins","type":"[AdminPlugin](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPlugin/page.mdx)[]","description":"The plugin's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The plugin's name.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
@@ -148,7 +148,7 @@ sdk.admin.product.batch({
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminBatchProductResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchProductResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The batch operations details.","expandable":false,"children":[{"name":"created","type":"[AdminProduct](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProduct/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variants","type":"`null` \\| [AdminProductVariant](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariant/page.mdx)[]","description":"The product's variants.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`null` \\| [AdminProductType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductType/page.mdx)","description":"The product's type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`null` \\| [AdminProductOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductOption/page.mdx)[]","description":"The product's options.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"`null` \\| [AdminProductImage](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductImage/page.mdx)[]","description":"The product's images.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The product's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The product's handle.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The product's subtitle.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The product's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx)","description":"The product's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The product's thumbnail.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The product's width.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The product's weight.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The product's length.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The product's height.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The product's origin country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The product's HS code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The product's MID code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The product's material.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The ID of the associated product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The ID of the associated product type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the product in external systems.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`null` \\| `string`","description":"The date the product was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`null` \\| `string`","description":"The date the product was update.","optionLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminBatchProductResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchProductResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The batch operations details.","expandable":false,"children":[{"name":"created","type":"[AdminProduct](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProduct/page.mdx)[]","description":"The items that were created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"variants","type":"`null` \\| [AdminProductVariant](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariant/page.mdx)[]","description":"The product's variants.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`null` \\| [AdminProductType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductType/page.mdx)","description":"The product's type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`null` \\| [AdminProductOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductOption/page.mdx)[]","description":"The product's options.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"images","type":"`null` \\| [AdminProductImage](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductImage/page.mdx)[]","description":"The product's images.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The product's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The product's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"handle","type":"`string`","description":"The product's handle.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtitle","type":"`null` \\| `string`","description":"The product's subtitle.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The product's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_giftcard","type":"`boolean`","description":"Whether the product is a gift card.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ProductStatus](../../../../../types/types/types.ProductStatus/page.mdx)","description":"The product's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The product's thumbnail.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The product's width.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The product's weight.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The product's length.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The product's height.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The product's origin country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The product's HS code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The product's MID code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The product's material.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"collection_id","type":"`null` \\| `string`","description":"The ID of the associated product collection.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type_id","type":"`null` \\| `string`","description":"The ID of the associated product type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discountable","type":"`boolean`","description":"Whether the product is discountable.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the product in external systems.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`null` \\| `string`","description":"The date the product was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`null` \\| `string`","description":"The date the Line truncated
___
@@ -377,7 +377,7 @@ sdk.admin.product.batchVariants("prod_123", {
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminBatchProductVariantResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchProductVariantResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The product variants' details.","expandable":false,"children":[{"name":"created","type":"[AdminProductVariant](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariant/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"prices","type":"`null` \\| [AdminPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPrice/page.mdx)[]","description":"The product variant's prices.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`null` \\| [AdminProductOptionValue](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductOptionValue/page.mdx)[]","description":"The variant's values for the associated product's options.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The variant's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The variant's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The variant's SKU.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"The variant's barcode.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"The variant's EAN.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"The variant's UPC.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`null` \\| `boolean`","description":"Whether the variant can be ordered even if it's out of stock.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manage_inventory","type":"`null` \\| `boolean`","description":"Whether Medusa manages the variant's inventory. If disabled, the variant\nis always considered in stock.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The variant's HS code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The variant's origin country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The variant's MID code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The variant's material.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The variant's weight.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The variant's length.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The variant's height.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The variant's width.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the variant was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the variant was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the variant was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`null` \\| [AdminProduct](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProduct/page.mdx)","description":"The product that this variant belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_items","type":"`null` \\| [AdminProductVariantInventoryItemLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariantInventoryItemLink/page.mdx)[]","description":"The variant's inventory items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The variant's inventory quantity if `manage_inventory` is enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_rank","type":"`null` \\| `number`","description":"The variant's ranking Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminBatchProductVariantResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchProductVariantResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The product variants' details.","expandable":false,"children":[{"name":"created","type":"[AdminProductVariant](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariant/page.mdx)[]","description":"The items that were created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"prices","type":"`null` \\| [AdminPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPrice/page.mdx)[]","description":"The product variant's prices.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`null` \\| [AdminProductOptionValue](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductOptionValue/page.mdx)[]","description":"The variant's values for the associated product's options.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The variant's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The variant's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The variant's SKU.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"The variant's barcode.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"The variant's EAN.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"The variant's UPC.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`null` \\| `boolean`","description":"Whether the variant can be ordered even if it's out of stock.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manage_inventory","type":"`null` \\| `boolean`","description":"Whether Medusa manages the variant's inventory. If disabled, the variant\nis always considered in stock.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The variant's HS code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The variant's origin country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The variant's MID code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The variant's material.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The variant's weight.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The variant's length.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The variant's height.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The variant's width.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the variant was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the variant was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the variant was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`null` \\| [AdminProduct](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProduct/page.mdx)","description":"The product that this variant belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_items","type":"`null` \\| [AdminProductVariantInventoryItemLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariantInventoryItemLink/page.mdx)[]","description":"The variant's inventory items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The variant's inventory quantity if `manage_inventory` is enabled.\nThis field is only retrieved in the [Get Product](https://docs.medusajs.com/api/store#products\\_getproductsid)\nand [List ProducLine truncated
___
@@ -545,7 +545,7 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminProductVariantResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariantResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The product variant's details.","expandable":false,"children":[{"name":"variant","type":"[AdminProductVariant](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariant/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"prices","type":"`null` \\| [AdminPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPrice/page.mdx)[]","description":"The product variant's prices.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`null` \\| [AdminProductOptionValue](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductOptionValue/page.mdx)[]","description":"The variant's values for the associated product's options.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The variant's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The variant's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The variant's SKU.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"The variant's barcode.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"The variant's EAN.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"The variant's UPC.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`null` \\| `boolean`","description":"Whether the variant can be ordered even if it's out of stock.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manage_inventory","type":"`null` \\| `boolean`","description":"Whether Medusa manages the variant's inventory. If disabled, the variant\nis always considered in stock.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The variant's HS code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The variant's origin country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The variant's MID code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The variant's material.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The variant's weight.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The variant's length.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The variant's height.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The variant's width.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the variant was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the variant was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the variant was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`null` \\| [AdminProduct](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProduct/page.mdx)","description":"The product that this variant belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_items","type":"`null` \\| [AdminProductVariantInventoryItemLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariantInventoryItemLink/page.mdx)[]","description":"The variant's inventory items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The variant's inventory quantity if `manage_inventory` is enabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_rank","type":"`null` \\| `number`","description":"The variant's ranking among its siLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminProductVariantResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariantResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The product variant's details.","expandable":false,"children":[{"name":"variant","type":"[AdminProductVariant](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariant/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"prices","type":"`null` \\| [AdminPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPrice/page.mdx)[]","description":"The product variant's prices.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"options","type":"`null` \\| [AdminProductOptionValue](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductOptionValue/page.mdx)[]","description":"The variant's values for the associated product's options.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The variant's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The variant's title.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The variant's SKU.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"barcode","type":"`null` \\| `string`","description":"The variant's barcode.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ean","type":"`null` \\| `string`","description":"The variant's EAN.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"upc","type":"`null` \\| `string`","description":"The variant's UPC.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"allow_backorder","type":"`null` \\| `boolean`","description":"Whether the variant can be ordered even if it's out of stock.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"manage_inventory","type":"`null` \\| `boolean`","description":"Whether Medusa manages the variant's inventory. If disabled, the variant\nis always considered in stock.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The variant's HS code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The variant's origin country.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The variant's MID code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The variant's material.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The variant's weight.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The variant's length.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The variant's height.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The variant's width.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the variant was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the variant was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the variant was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"product","type":"`null` \\| [AdminProduct](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProduct/page.mdx)","description":"The product that this variant belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_items","type":"`null` \\| [AdminProductVariantInventoryItemLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminProductVariantInventoryItemLink/page.mdx)[]","description":"The variant's inventory items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_quantity","type":"`number`","description":"The variant's inventory quantity if `manage_inventory` is enabled.\nThis field is only retrieved in the [Get Product](https://docs.medusajs.com/api/store#products\\_getproductsid)\nand [List Products](https://docs.medusajs.com/api/store#Line truncated
___
@@ -622,7 +622,7 @@ sdk.admin.product.batchVariantInventoryItems(
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminBatchProductVariantInventoryItemResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchProductVariantInventoryItemResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the created, updated, or deleted inventory items.","expandable":false,"children":[{"name":"created","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The inventory item's SKU.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The inventory item's origin country.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The inventory item's HS code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The inventory item's MID code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The inventory item's material.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The inventory item's weight.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The inventory item's length.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The inventory item's height.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The inventory item's width.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The inventory item's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The inventory item's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The inventory item's thumbnail URL.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_levels","type":"[AdminInventoryLevel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryLevel/page.mdx)[]","description":"The item's associated inventory levels.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The inventory item's SKU.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The inventory item's origin country.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The inventory item's HS code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The inventory item's MID code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The inventory item's material.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The inventory item's weight.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The inventory item's length.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `nuLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminBatchProductVariantInventoryItemResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchProductVariantInventoryItemResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the created, updated, or deleted inventory items.","expandable":false,"children":[{"name":"created","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)[]","description":"The items that were created.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The inventory item's SKU.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The inventory item's origin country.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The inventory item's HS code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The inventory item's MID code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The inventory item's material.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The inventory item's weight.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The inventory item's length.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"height","type":"`null` \\| `number`","description":"The inventory item's height.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"width","type":"`null` \\| `number`","description":"The inventory item's width.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`null` \\| `string`","description":"The inventory item's title.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The inventory item's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"thumbnail","type":"`null` \\| `string`","description":"The inventory item's thumbnail URL.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_levels","type":"[AdminInventoryLevel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryLevel/page.mdx)[]","description":"The item's associated inventory levels.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)[]","description":"The items that were updated.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The inventory item's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"requires_shipping","type":"`boolean`","description":"Whether the item requires shipping.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sku","type":"`null` \\| `string`","description":"The inventory item's SKU.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"origin_country","type":"`null` \\| `string`","description":"The inventory item's origin country.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"hs_code","type":"`null` \\| `string`","description":"The inventory item's HS code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"mid_code","type":"`null` \\| `string`","description":"The inventory item's MID code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"material","type":"`null` \\| `string`","description":"The inventory item's material.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"weight","type":"`null` \\| `number`","description":"The inventory item's weight.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"length","type":"`null` \\| `number`","description":"The inventory item's length.","optional":true,"defaultValue":"","expandable":falsLine truncated
___
@@ -15,130 +15,375 @@ This documentation provides a reference to the `sdk.admin.promotion` set of meth
## retrieve
This method retrieves a promotion by its ID. It sends a request to the
[Retrieve Promotion](https://docs.medusajs.com/api/admin#promotions\_getpromotionsid)
API route.
### Example
To retrieve a promotion by its ID:
```ts
sdk.admin.promotion.retrieve("promo_123")
.then(({ promotion }) => {
console.log(promotion)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.promotion.retrieve("promo_123", {
fields: "id,*application_method"
})
.then(({ promotion }) => {
console.log(promotion)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminGetPromotionParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetPromotionParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The promotion's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminGetPromotionParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetPromotionParams/page.mdx)","description":"Configure the fields to retrieve in the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The promotion's details.","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"The promotion's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"The promotion's application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"The rules for the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## list
This method retrieves a list of promotions. It sends a request to the
[List Promotions](https://docs.medusajs.com/api/admin#promotions\_getpromotions)
API route.
### Example
To retrieve the list of promotions:
```ts
sdk.admin.promotion.list()
.then(({ promotions, count, limit, offset }) => {
console.log(promotions)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.promotion.list({
limit: 10,
offset: 10
})
.then(({ promotions, count, limit, offset }) => {
console.log(promotions)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each promotion:
```ts
sdk.admin.promotion.list({
fields: "id,*application_method"
})
.then(({ promotions, count, limit, offset }) => {
console.log(promotions)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminGetPromotionsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetPromotionsParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":truLine truncated
<TypeList types={[{"name":"query","type":"[AdminGetPromotionsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetPromotionsParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search for a promotion by its searchable","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by promotion code.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"campaign_id","type":"`string` \\| `string`[]","description":"Filter by campaign ID to retrieve promotions by campaign.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"`object`","description":"Filter by the promotion's application method.","optional":true,"defaultValue":"","expandable":false,"childLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPromotionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPromotionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of promotions.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## create
This method creates a new promotion. It sends a request to the
[Create Promotion](https://docs.medusajs.com/api/admin#promotions\_postpromotions)
API route.
### Example
```ts
sdk.admin.promotion.create({
name: "My Promotion",
description: "This is a test promotion",
code: "PROMO123",
starts_at: "2021-01-01",
ends_at: "2021-01-01",
})
.then(({ promotion }) => {
console.log(promotion)
})
```
### Parameters
<TypeList types={[{"name":"payload","type":"[AdminCreatePromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminCreateApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateApplicationMethod/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../../../../promotion/types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The application method's possible types.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../../../../promotion/types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The application method's possible target types.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../../../../promotion/types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The application method's possible allocation values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCreateCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The campaign's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The campaign's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"`null` \\| `string`","description":"The campaign's currency code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign's identifier.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `Date`","description":"The date the campaign and its promotions start at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The date the campaign and its promotions end at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"`null` \\| `object`","description":"The campaign's budget.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The possible operators to use in a proLine truncated
<TypeList types={[{"name":"payload","type":"[AdminCreatePromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotion/page.mdx)","description":"The promotion to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The promotion's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of promotion.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminCreateApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateApplicationMethod/page.mdx)","description":"The application method of the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`number`","description":"The value of the application method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../../../../promotion/types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../../../../promotion/types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating whether the associated promotion is applied \nto the cart's items, shipping methods, or the whole order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../../../../promotion/types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion is applied on each \nitem in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"The target rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"The buy rules of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"The quantity of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"The minimum quantity required for a `buyget` promotion to be applied. For example, \nif the promotion is a \"Buy 2 shirts get 1 free\", the value of this attribute is 2.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically \nor requires the customer to manually apply it\nby entering the code at checkout.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`null` \\| `string`","description":"The ID of the campaign that the promotion belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCreateCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCampaign/page.mdx)","description":"The campaign that the promotion belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The campaign's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The campaign's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"`null` \\| `string`","description":"The campaign's currency code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign's identifier.","optional":Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The promotion's details.","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"The promotion's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"The promotion's application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"The rules for the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## update
This method updates a promotion. It sends a request to the
[Update Promotion](https://docs.medusajs.com/api/admin#promotions\_postpromotionsid)
API route.
### Example
```ts
sdk.admin.promotion.update("promo_123", {
code: "PROMO123",
})
.then(({ promotion }) => {
console.log(promotion)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[AdminUpdatePromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdatePromotion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCreateCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The campaign's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The campaign's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"`null` \\| `string`","description":"The campaign's currency code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign's identifier.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `Date`","description":"The date the campaign and its promotions start at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The date the campaign and its promotions end at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"`null` \\| `object`","description":"The campaign's budget.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"application_method","type":"[AdminUpdateApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateApplicationMethod/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../../../../promotion/types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The application method's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../../../../promotion/types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The application method's possible target types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../../../../promotion/types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The application method's possible allocation values.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"apply_to_quantity","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"buy_rules_min_quantity","type":"`null` \\| `number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules","type":"[AdminCreatePromotionRule](../../../../../typLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The promotion's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[AdminUpdatePromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdatePromotion/page.mdx)","description":"The details to update in the promotion.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The promotion's code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"Whether the promotion is applied automatically \nor requires the customer to manually apply it\nby entering the code at checkout.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The type of promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The status of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`null` \\| `string`","description":"The ID of the campaign that the promotion belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCreateCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCampaign/page.mdx)","description":"The campaign that the promotion belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The campaign's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The campaign's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency","type":"`null` \\| `string`","description":"The campaign's currency code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_identifier","type":"`string`","description":"The campaign's identifier.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"starts_at","type":"`null` \\| `Date`","description":"The date the campaign and its promotions start at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"ends_at","type":"`null` \\| `Date`","description":"The date the campaign and its promotions end at.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"budget","type":"`null` \\| `object`","description":"The campaign's budget.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"application_method","type":"[AdminUpdateApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateApplicationMethod/page.mdx)","description":"The application method of the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"description","type":"`null` \\| `string`","description":"The description of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`number`","description":"The value of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"max_quantity","type":"`null` \\| `number`","description":"The max quantity allowed in the cart for the associated promotion to be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[ApplicationMethodTypeValues](../../../../../promotion/types/promotion.ApplicationMethodTypeValues/page.mdx)","description":"The type of the application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_type","type":"[ApplicationMethodTargetTypeValues](../../../../../promotion/types/promotion.ApplicationMethodTargetTypeValues/page.mdx)","description":"The target type of the application method indicating whether the associated promotion is applied \nto the cart's items, shipping methods, or the whole order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"allocation","type":"[ApplicationMethodAllocationValues](../../../../../promotion/types/promotion.ApplicationMethodAllocationValues/page.mdx)","description":"The allocation value that indicates whether the associated promotion is applied on each \nitem in a cart or split between the items in the cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"target_rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/typeLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The promotion's details.","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"The promotion's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"The promotion's application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"The rules for the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## delete
This method deletes a promotion. It sends a request to the
[Delete Promotion](https://docs.medusajs.com/api/admin#promotions\_deletepromotionsid)
API route.
### Example
```ts
sdk.admin.promotion.delete("promo_123")
.then(({ promotion }) => {
console.log(promotion)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The promotion's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.DeleteResponse/page.mdx)&#60;\"promotion\"&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"\"promotion\"","type":"`\"promotion\"`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.DeleteResponse/page.mdx)&#60;\"promotion\"&#62;&#62;","optional":false,"defaultValue":"","description":"The deleted promotion's details.","expandable":false,"children":[{"name":"\"promotion\"","type":"`\"promotion\"`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
___
## addRules
This method creates and adds rules to a promotion. It can be the promotion's rules,
or its application method's buy or target rules. That depends on the rule type
you specify as a parameter.
- If you set the `ruleType` to `rules`, the method sends a request to the
[Manage Promotion's Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidrulesbatch).
- If you set the `ruleType` to `buy-rules`, the method sends a request to the
[Manage Promotion's Buy Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidbuyrulesbatch).
- If you set the `ruleType` to `target-rules`, the method sends a request to the
[Manage Promotion's Target Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidtargetrulesbatch).
### Example
```ts
sdk.admin.promotion.addRules("promo_123", "rules", {
rules: [
{
operator: "eq",
attribute: "product_id",
values: ["prod_123"]
}
]
})
.then(({ promotion }) => {
console.log(promotion)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[BatchAddPromotionRulesReq](../../../../../types/HttpTypes/interfaces/types.HttpTypes.BatchAddPromotionRulesReq/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The possible operators to use in a promotion rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addRules"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The promotion's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleType","type":"`string`","description":"The type of rules to create.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[BatchAddPromotionRulesReq](../../../../../types/HttpTypes/interfaces/types.HttpTypes.BatchAddPromotionRulesReq/page.mdx)","description":"The rules to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"[AdminCreatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreatePromotionRule/page.mdx)[]","description":"The rules to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator used to check whether the buy rule applies on a cart. \nFor example, `eq` means that the cart's value for the specified attribute \nmust match the specified value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute to compare against when checking whether a promotion can be applied on a cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string` \\| `string`[]","description":"The value to compare against when checking whether a promotion can be applied on a cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addRules"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addRules"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The promotion's details.","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"The promotion's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"The promotion's application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"The rules for the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addRules"/>
___
## updateRules
This method updates the rules of a promotion. It can be the promotion's rules,
or its application method's buy or target rules. That depends on the rule type
you specify as a parameter.
- If you set the `ruleType` to `rules`, the method sends a request to the
[Manage Promotion's Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidrulesbatch).
- If you set the `ruleType` to `buy-rules`, the method sends a request to the
[Manage Promotion's Buy Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidbuyrulesbatch).
- If you set the `ruleType` to `target-rules`, the method sends a request to the
[Manage Promotion's Target Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidtargetrulesbatch).
### Example
```ts
sdk.admin.promotion.updateRules("promo_123", "rules", {
rules: [
{
id: "rule_123",
operator: "ne",
}
]
})
.then(({ promotion }) => {
console.log(promotion)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[BatchUpdatePromotionRulesReq](../../../../../types/HttpTypes/interfaces/types.HttpTypes.BatchUpdatePromotionRulesReq/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"[AdminUpdatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdatePromotionRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The possible operators to use in a promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRules"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The promotion's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleType","type":"`string`","description":"The type of rules to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[BatchUpdatePromotionRulesReq](../../../../../types/HttpTypes/interfaces/types.HttpTypes.BatchUpdatePromotionRulesReq/page.mdx)","description":"The rules to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"[AdminUpdatePromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdatePromotionRule/page.mdx)[]","description":"The rules to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The possible operators to use in a promotion rule.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRules"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRules"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The promotion's details.","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"The promotion's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"The promotion's application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"The rules for the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRules"/>
___
## removeRules
This method removes rules from a promotion. It can be the promotion's rules,
or its application method's buy or target rules. That depends on the rule type
you specify as a parameter.
- If you set the `ruleType` to `rules`, the method sends a request to the
[Manage Promotion's Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidrulesbatch).
- If you set the `ruleType` to `buy-rules`, the method sends a request to the
[Manage Promotion's Buy Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidbuyrulesbatch).
- If you set the `ruleType` to `target-rules`, the method sends a request to the
[Manage Promotion's Target Rules API Route](https://docs.medusajs.com/api/admin#promotions\_postpromotionsidtargetrulesbatch).
### Example
```ts
sdk.admin.promotion.removeRules("promo_123", "rules", {
rule_ids: ["rule_123"]
})
.then(({ promotion }) => {
console.log(promotion)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[BatchRemovePromotionRulesReq](../../../../../types/HttpTypes/interfaces/types.HttpTypes.BatchRemovePromotionRulesReq/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rule_ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRules"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The promotion's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleType","type":"`string`","description":"The type of rules to remove.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[BatchRemovePromotionRulesReq](../../../../../types/HttpTypes/interfaces/types.HttpTypes.BatchRemovePromotionRulesReq/page.mdx)","description":"The rules to remove.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"rule_ids","type":"`string`[]","description":"The IDs of the rules to remove.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRules"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRules"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The promotion's details.","expandable":false,"children":[{"name":"promotion","type":"[AdminPromotion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotion/page.mdx)","description":"The promotion's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method","type":"[AdminApplicationMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminApplicationMethod/page.mdx)","description":"The promotion's application method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"The rules for the promotion.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[PromotionTypeValues](../../../../../promotion/types/promotion.PromotionTypeValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_automatic","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[PromotionStatusValues](../../../../../promotion/types/promotion.PromotionStatusValues/page.mdx)","description":"The promotion's possible types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"campaign","type":"[AdminCampaign](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCampaign/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeRules"/>
___
## listRules
This method retrieves the rules of a promotion. It can be the promotion's rules,
or its application method's buy or target rules. That depends on the rule type
you specify as a parameter.
This method sends a request to the
[List Rules of a Promotion API Route](https://docs.medusajs.com/api/admin#promotions\_getpromotionsidrule\_type)
### Example
```ts
sdk.admin.promotion.listRules("promo_123", "rules")
.then(({ rules }) => {
console.log(rules)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminGetPromotionRuleParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetPromotionRuleParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"promotion_type","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method_type","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRules"/>
<TypeList types={[{"name":"id","type":"`null` \\| `string`","description":"The promotion's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleType","type":"`string`","description":"The type of rules to retrieve. Can be `rules`, `buy-rules`, or `target-rules`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminGetPromotionRuleParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetPromotionRuleParams/page.mdx)","description":"Configure the fields to retrieve in the rules.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"promotion_type","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"application_method_type","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRules"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRuleAttributeOptionsListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminRuleAttributeOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"attributes","type":"[AdminRuleAttributeOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRuleAttributeOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operators","type":"[BaseRuleOperatorOptions](../../../../../types/interfaces/types.BaseRuleOperatorOptions/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRules"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminPromotionRuleListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminPromotionRuleListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The promotion's rules.","expandable":false,"children":[{"name":"rules","type":"[AdminPromotionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPromotionRule/page.mdx)[]","description":"The list of promotion rules.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The rule's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"values","type":"[BasePromotionRuleValue](../../../../../types/interfaces/types.BasePromotionRuleValue/page.mdx)[]","description":"The values to compare against when checking whether a promotion can be applied on a cart.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The rule's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"The attribute to compare against when checking whether a promotion can be applied on a cart.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"operator","type":"[PromotionRuleOperatorValues](../../../../../promotion/types/promotion.PromotionRuleOperatorValues/page.mdx)","description":"The operator used to check whether the buy rule applies on a cart. \nFor example, `eq` means that the cart's value for the specified attribute \nmust match the specified value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRules"/>
___
## listRuleAttributes
Retrieve a list of potential rule attributes for the promotion and application method types specified in the query parameters. Only the attributes of the rule type specified in the path parameter are retrieved:
- If `rule_type` is `rules`, the attributes of the promotion's type are retrieved.
- If `rule_type` is `target-rules`, the target rules' attributes of the application method's type are retrieved.
- If `rule_type` is `buy-rules`, the buy rules' attributes of the application method's type are retrieved.
This method sends a request to the
[List Rule Attribute Options API Route](https://docs.medusajs.com/api/admin#promotions\_getpromotionsruleattributeoptionsrule\_type)
### Example
```ts
sdk.admin.promotion.listRuleAttributes("rules", "standard")
.then(({ attributes }) => {
console.log(attributes)
})
```
### Parameters
<TypeList types={[{"name":"ruleType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"promotionType","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRuleAttributes"/>
<TypeList types={[{"name":"ruleType","type":"`string`","description":"The type of rules to retrieve the attributes for. Can be `rules`, `buy-rules`, or `target-rules`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"promotionType","type":"`string`","description":"The type of promotion to retrieve the attributes for. It can be `standard` or `buyget`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRuleAttributes"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRuleAttributeOptionsListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminRuleAttributeOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"attributes","type":"[AdminRuleAttributeOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRuleAttributeOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operators","type":"[BaseRuleOperatorOptions](../../../../../types/interfaces/types.BaseRuleOperatorOptions/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRuleAttributes"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRuleAttributeOptionsListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminRuleAttributeOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of rule attributes.","expandable":false,"children":[{"name":"attributes","type":"[AdminRuleAttributeOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRuleAttributeOption/page.mdx)[]","description":"The list of rule attribute options.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The rule attribute option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The rule attribute option's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The rule attribute option's label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"operators","type":"[BaseRuleOperatorOptions](../../../../../types/interfaces/types.BaseRuleOperatorOptions/page.mdx)[]","description":"The attribute option's operators.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRuleAttributes"/>
___
## listRuleValues
Retrieve all potential values for promotion rules and target and buy rules based on the specified rule attribute and type.
For example, if you provide the ID of the `currency_code` rule attribute, and set `rule_type` to rules,
a list of currencies are retrieved in label-value pairs.
This method sends a request to the
[List Rule Values API Route](https://docs.medusajs.com/api/admin#promotions\_getpromotionsrulevalueoptionsrule\_typerule\_attribute\_id)
### Example
```ts
sdk.admin.promotion.listRuleValues("rules", "attr_123")
.then(({ values }) => {
console.log(values)
})
```
### Parameters
<TypeList types={[{"name":"ruleType","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleValue","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminGetPromotionsRuleValueParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetPromotionsRuleValueParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRuleValues"/>
<TypeList types={[{"name":"ruleType","type":"`string`","description":"The type of rules to retrieve the values for. Can be `rules`, `buy-rules`, or `target-rules`.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"ruleValue","type":"`string`","description":"The ID of the rule attribute to retrieve the values for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminGetPromotionsRuleValueParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetPromotionsRuleValueParams/page.mdx)","description":"Configure the fields to retrieve in the rule values.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Search for a rule value by its searchable","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[]","description":"Filter by rule value.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRuleValues"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRuleValueOptionsListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminRuleValueOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"values","type":"[AdminRuleValueOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRuleValueOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRuleValues"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRuleValueOptionsListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminRuleValueOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of rule values.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listRuleValues"/>
@@ -15,10 +15,53 @@ This documentation provides a reference to the `sdk.admin.refundReason` set of m
## list
This method retrieves a list of refund reasons. It sends a request to the
[List Refund Reasons](https://docs.medusajs.com/api/admin#refund-reasons\_getrefundreasons)
API route.
### Example
To retrieve the list of refund reasons:
```ts
sdk.admin.refundReason.list()
.then(({ refund_reasons, count, limit, offset }) => {
console.log(refund_reasons)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.refundReason.list({
limit: 10,
offset: 10
})
.then(({ refund_reasons, count, limit, offset }) => {
console.log(refund_reasons)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each refund reason:
```ts
sdk.admin.refundReason.list({
fields: "id,name"
})
.then(({ refund_reasons, count, limit, offset }) => {
console.log(refund_reasons)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[RefundReasonFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.RefundReasonFilters/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminRefundReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefundReason/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRefundReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefundReason/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminRefundReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefundReason/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRefundReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefundReason/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandabLine truncated
<TypeList types={[{"name":"query","type":"[RefundReasonFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.RefundReasonFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminRefundReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefundReason/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRefundReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefundReason/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminRefundReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefundReason/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRefundReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRefundReason/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The label of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the refund reason","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the refund reason was created","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the refund reason was updated","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the refund reason","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;T&#62; \\| T)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optiLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[RefundReasonsResponse](../../../../../types/HttpTypes/types/types.HttpTypes.RefundReasonsResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[RefundReasonsResponse](../../../../../types/HttpTypes/types/types.HttpTypes.RefundReasonsResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of refund reasons.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
@@ -15,58 +15,173 @@ This documentation provides a reference to the `sdk.admin.region` set of methods
## create
This method creates a new region. It sends a request to the
[Create Region](https://docs.medusajs.com/api/admin#regions\_postregions)
API route.
### Example
```ts
sdk.admin.region.create({
name: "United States",
currency_code: "usd",
})
.then(({ region }) => {
console.log(region)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[AdminCreateRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateRegion/page.mdx)","description":"The details of the region to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"`string`[]","description":"The 2 ISO code of the countries in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes are automatically calculated during checkout\nfor this region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether prices in this region include taxes by default.\n\nLearn more in the [tax-inclusive pricing](https://docs.medusajs.com/resources/commerce-modules/pricing/tax-inclusive-pricing#content) documentation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"`string`[]","description":"The IDs of the payment providers that are available in this region. The IDs are \nof the format `pp_{identifier}_{id}`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the region.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"region","type":"[AdminRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The region's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The region's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[AdminRegionCountry](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionCountry/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes are calculated automatically in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[AdminPaymentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentProvider/page.mdx)[]","description":"The payment providers enabled in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRegionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The created region's details.","expandable":false,"children":[{"name":"region","type":"[AdminRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegion/page.mdx)","description":"The region's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The region's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The region's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[AdminRegionCountry](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionCountry/page.mdx)[]","description":"The countries in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes are calculated automatically in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[AdminPaymentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentProvider/page.mdx)[]","description":"The payment providers enabled in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## update
This method updates a region. It sends a request to the
[Update Region](https://docs.medusajs.com/api/admin#regions\_postregionsid)
API route.
### Example
```ts
sdk.admin.region.update("region_123", {
name: "United States",
})
.then(({ region }) => {
console.log(region)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the region to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateRegion/page.mdx)","description":"The details of the region to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"`string`[]","description":"The 2 ISO code of the countries in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes are automatically calculated during checkout\nfor this region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether prices in this region include taxes by default.\n\nLearn more in the [tax-inclusive pricing](https://docs.medusajs.com/resources/commerce-modules/pricing/tax-inclusive-pricing#content) documentation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"`string`[]","description":"The IDs of the payment providers that are available in this region. The IDs are \nof the format `pp_{identifier}_{id}`.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the region.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"region","type":"[AdminRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The region's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The region's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[AdminRegionCountry](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionCountry/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes are calculated automatically in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[AdminPaymentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentProvider/page.mdx)[]","description":"The payment providers enabled in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRegionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The updated region's details.","expandable":false,"children":[{"name":"region","type":"[AdminRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegion/page.mdx)","description":"The region's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The region's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The region's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[AdminRegionCountry](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionCountry/page.mdx)[]","description":"The countries in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes are calculated automatically in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[AdminPaymentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentProvider/page.mdx)[]","description":"The payment providers enabled in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## list
This method retrieves a list of regions. It sends a request to the
[List Regions](https://docs.medusajs.com/api/admin#regions\_getregions)
API route.
### Example
To retrieve the list of regions:
```ts
sdk.admin.region.list()
.then(({ regions, count, limit, offset }) => {
console.log(regions)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.region.list({
limit: 10,
offset: 10
})
.then(({ regions, count, limit, offset }) => {
console.log(regions)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each region:
```ts
sdk.admin.region.list({
fields: "id,*countries"
})
.then(({ regions, count, limit, offset }) => {
console.log(regions)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"queryParams","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)&#62;)[Line truncated
<TypeList types={[{"name":"queryParams","type":"[FindParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.FindParams/page.mdx) & [AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"([AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminRegionFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionFilters/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the region's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by region ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string` \\| `string`[]","description":"Filter by currency code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by region name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's creation date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's update date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the region's deletion date.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminRegionFiltLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[PaginatedResponse](../../../../../types/HttpTypes/types/types.HttpTypes.PaginatedResponse/page.mdx)&#60;object&#62;&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"regions","type":"[AdminRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegion/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRegionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminRegionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of regions.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## retrieve
This method retrieves a region by ID. It sends a request to the
[Get Region](https://docs.medusajs.com/api/admin#regions\_getregionsid)
API route.
### Example
To retrieve a region by its ID:
```ts
sdk.admin.region.retrieve("region_123")
.then(({ region }) => {
console.log(region)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.region.retrieve("region_123", {
fields: "id,*countries"
})
.then(({ region }) => {
console.log(region)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the region to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"region","type":"[AdminRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The region's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The region's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[AdminRegionCountry](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionCountry/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes are calculated automatically in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[AdminPaymentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentProvider/page.mdx)[]","description":"The payment providers enabled in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRegionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The region's details.","expandable":false,"children":[{"name":"region","type":"[AdminRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegion/page.mdx)","description":"The region's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The region's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The region's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"countries","type":"[AdminRegionCountry](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRegionCountry/page.mdx)[]","description":"The countries in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"automatic_taxes","type":"`boolean`","description":"Whether taxes are calculated automatically in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_providers","type":"[AdminPaymentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentProvider/page.mdx)[]","description":"The payment providers enabled in the region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the region was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the region was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## delete
This method deletes a region by ID. It sends a request to the
[Delete Region](https://docs.medusajs.com/api/admin#regions\_deleteregionsid)
API route.
### Example
```ts
sdk.admin.region.delete("region_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the region to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRegionDeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminRegionDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"TObject","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminRegionDeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminRegionDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"TObject","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
@@ -15,58 +15,174 @@ This documentation provides a reference to the `sdk.admin.reservation` set of me
## retrieve
This method retrieves a reservation by ID. It sends a request to the
[Get Reservation](https://docs.medusajs.com/api/admin#reservations\_getreservationsid)
API route.
### Example
To retrieve a reservation by its ID:
```ts
sdk.admin.reservation.retrieve("res_123")
.then(({ reservation }) => {
console.log(reservation)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.reservation.retrieve("res_123", {
fields: "id,name"
})
.then(({ reservation }) => {
console.log(reservation)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminReservationParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminReservationParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationParams/page.mdx)","description":"Configure the fields and relations to retrieve in the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The reservation's details.","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"The reservation's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the line item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity is reserved from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity that is reserved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the reservation in an external system.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the inventory item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"The inventory item that the reservation is for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date that the reservation was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date that the reservation was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date that the reservation was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## list
This method retrieves a list of reservations. It sends a request to the
[List Reservations](https://docs.medusajs.com/api/admin#reservations\_getreservations)
API route.
### Example
To retrieve the list of reservations:
```ts
sdk.admin.reservation.list()
.then(({ reservations, count, limit, offset }) => {
console.log(reservations)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.reservation.list({
limit: 10,
offset: 10
})
.then(({ reservations, count, limit, offset }) => {
console.log(reservations)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each reservation:
```ts
sdk.admin.reservation.list({
fields: "id,*inventory_item"
})
.then(({ reservations, count, limit, offset }) => {
console.log(reservations)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"nLine truncated
<TypeList types={[{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of reservations to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of reservations to skip.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the location(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the inventory item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the line item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the user(s) to retrieve the\nreservations they created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by reservation description(s).","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdxLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReservationListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReservationListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of reservations.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## create
This method creates a reservation. It sends a request to the
[Create Reservation](https://docs.medusajs.com/api/admin#reservations\_postreservations)
API route.
### Example
```ts
sdk.admin.reservation.create({
inventory_item_id: "iitem_123",
location_id: "sloc_123",
quantity: 10,
})
.then(({ reservation }) => {
console.log(reservation)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`Line truncated
<TypeList types={[{"name":"body","type":"[AdminCreateReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReservation/page.mdx)","description":"The details of the reservation to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity\nis reserved from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the inventory item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the inventory item that is reserved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the line item to create the reservation for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"Configure the fields and relations to retrieve in the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of reservations to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of reservations to skip.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the location(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the inventory item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the line item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the user(s) to retrieve the\nreservations they created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by reservation description(s).","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../..Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The reservation's details.","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"The reservation's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the line item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity is reserved from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity that is reserved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the reservation in an external system.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the inventory item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"The inventory item that the reservation is for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date that the reservation was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date that the reservation was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date that the reservation was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## update
This method updates a reservation. It sends a request to the
[Update Reservation](https://docs.medusajs.com/api/admin#reservations\_postreservationsid)
API route.
### Example
```ts
sdk.admin.reservation.update("res_123", {
quantity: 20,
})
.then(({ reservation }) => {
console.log(reservation)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optionaLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReservation/page.mdx)","description":"The details of the reservation to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity\nis reserved from.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the inventory item that is reserved.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminGetReservationsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetReservationsParams/page.mdx)","description":"Configure the fields and relations to retrieve in the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of reservations to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of reservations to skip.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the location(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the inventory item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the line item(s) to retrieve the\nreservations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the user(s) to retrieve the\nreservations they created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by reservation description(s).","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#6Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The reservation's details.","expandable":false,"children":[{"name":"reservation","type":"[AdminReservation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReservation/page.mdx)","description":"The reservation's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"line_item_id","type":"`null` \\| `string`","description":"The ID of the line item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the location that the quantity is reserved from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity that is reserved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"external_id","type":"`null` \\| `string`","description":"The ID of the reservation in an external system.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The description of the reservation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item_id","type":"`string`","description":"The ID of the inventory item that the reservation is for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"inventory_item","type":"[AdminInventoryItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInventoryItem/page.mdx)","description":"The inventory item that the reservation is for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the reservation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date that the reservation was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date that the reservation was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date that the reservation was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## delete
This method deletes a reservation by ID. It sends a request to the
[Delete Reservation](https://docs.medusajs.com/api/admin#reservations\_deletereservationsid)
API route.
### Example
```ts
sdk.admin.reservation.delete("res_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The reservation's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationDeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReservationDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"TObject","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReservationDeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReservationDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"TObject","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
@@ -15,262 +15,695 @@ This documentation provides a reference to the `sdk.admin.return` set of methods
## list
This method retrieves a list of returns. It sends a request to the
[List Returns](https://docs.medusajs.com/api/admin#returns\_getreturns)
API route.
### Example
To retrieve the list of returns:
```ts
sdk.admin.return.list()
.then(({ returns, count, limit, offset }) => {
console.log(returns)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.return.list({
limit: 10,
offset: 10
})
.then(({ returns, count, limit, offset }) => {
console.log(returns)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each return:
```ts
sdk.admin.return.list({
fields: "id,*items"
})
.then(({ returns, count, limit, offset }) => {
console.log(returns)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminReturnFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnFilters/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":falsLine truncated
<TypeList types={[{"name":"query","type":"[AdminReturnFilters](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnFilters/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by return ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"order_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by order ID(s) to retrieve their returns.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/tLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnsResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReturnsResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnsResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminReturnsResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of returns.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## retrieve
This method retrieves a return by ID. It sends a request to the
[Get Return](https://docs.medusajs.com/api/admin#returns\_getreturnsid)
API route.
### Example
To retrieve a return by its ID:
```ts
sdk.admin.return.retrieve("return_123")
.then(({ return }) => {
console.log(return)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.return.retrieve("return_123", {
fields: "id,*items"
})
.then(({ return }) => {
console.log(return)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## initiateRequest
This method initiates a return request by creating a return. It sends a request to the
[Create Return](https://docs.medusajs.com/api/admin#returns\_postreturns)
API route.
### Example
```ts
sdk.admin.return.initiateRequest({
order_id: "order_123",
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminInitiateReturnRequest](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInitiateReturnRequest/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiateRequest"/>
<TypeList types={[{"name":"body","type":"[AdminInitiateReturnRequest](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInitiateReturnRequest/page.mdx)","description":"The details of the return to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location to return the items to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The return's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to\ndescribe the return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send a notification to the customer\nfor return updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the return.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiateRequest"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiateRequest"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiateRequest"/>
___
## cancel
This method cancels a return. It sends a request to the
[Cancel Return](https://docs.medusajs.com/api/admin#returns\_postreturnsidcancel)
API route.
### Example
```ts
sdk.admin.return.cancel("return_123")
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to cancel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancel"/>
___
## cancelRequest
This method cancels a return request. It sends a request to the
[Cancel Return Request](https://docs.medusajs.com/api/admin#returns\_deletereturnsidrequest)
API route.
### Example
```ts
sdk.admin.return.cancelRequest("return_123")
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelRequest"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to cancel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelRequest"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelRequest"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelRequest"/>
___
## addReturnItem
This method adds an item to a return request. It sends a request to the
[Add Return Item](https://docs.medusajs.com/api/admin#returns\_postreturnsidrequestitems)
API route.
### Example
```ts
sdk.admin.return.addReturnItem("return_123", {
id: "orlitem_123",
quantity: 1,
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddReturnItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnItems/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminAddReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addReturnItem"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to add the item to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddReturnItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnItems/page.mdx)","description":"The details of the item to add to the return.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminAddReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the order item to add to the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the item to return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"A note to describe why the item is being returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to\ndescribe why the item is being returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the return item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addReturnItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addReturnItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addReturnItem"/>
___
## updateReturnItem
This method updates an item in a return request by the ID of the item's `RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name
using its `action` property, and use the value of the `id` property. For example,
`item.actions.find((action) => action.action === "RETURN_ITEM")?.id` is the ID of an item's `RETURN_ITEM` action.
This method sends a request to the
[Update Requested Return Item](https://docs.medusajs.com/api/admin#returns\_postreturnsidrequestitemsaction\_id)
API route.
### Example
```ts
sdk.admin.return.updateReturnItem("return_123", "orchach_123", {
quantity: 2,
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReturnItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReturnItems/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reason_id","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReturnItem"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to update the item in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The ID of the item's `RETURN_ITEM` action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReturnItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReturnItems/page.mdx)","description":"The details of the item to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The quantity of the item to return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"A note that is viewed by admins only to\ndescribe why the item is being returned.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reason_id","type":"`null` \\| `string`","description":"The ID of the return reason to associate with the item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReturnItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReturnItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReturnItem"/>
___
## removeReturnItem
This method removes an item from a return request by the ID of the item's `RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name
using its `action` property, and use the value of the `id` property. For example,
`item.actions.find((action) => action.action === "RETURN_ITEM")?.id` is the ID of an item's `RETURN_ITEM` action.
This method sends a request to the
[Remove Item from Return](https://docs.medusajs.com/api/admin#returns\_deletereturnsidrequestitemsaction\_id)
API route.
### Example
```ts
sdk.admin.return.removeReturnItem("return_123", "orchach_123")
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeReturnItem"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to remove the item from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The ID of the item's `RETURN_ITEM` action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeReturnItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeReturnItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeReturnItem"/>
___
## addReturnShipping
This method adds a shipping method to a return request. It sends a request to the
[Add Shipping Method to Return](https://docs.medusajs.com/api/admin#returns\_postreturnsidshippingmethod)
API route.
### Example
```ts
sdk.admin.return.addReturnShipping("return_123", {
shipping_option_id: "so_123",
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddReturnShipping](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnShipping/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addReturnShipping"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to add the shipping method to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddReturnShipping](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnShipping/page.mdx)","description":"The details of the shipping method to add to the return.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"The ID of the shipping option that the shipping method\nis created from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"A custom amount to set for the shipping method.\nIf not provided, the shipping option's fixed or calculated amount will be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"A note to describe the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to\ndescribe the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addReturnShipping"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addReturnShipping"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addReturnShipping"/>
___
## updateReturnShipping
This method updates a shipping method in a return request by the ID of the shipping method's `SHIPPING_ADD` action.
Every shipping method has an `actions` property, whose value is an array of actions. You can check the action's name
using its `action` property, and use the value of the `id` property.
For example, `shipping_method.actions.find((action) => action.action === "SHIPPING_ADD")?.id` is
the ID of a shipping method's `SHIPPING_ADD` action.
This method sends a request to the
[Update Shipping Method in Return](https://docs.medusajs.com/api/admin#returns\_postreturnsidshippingmethodaction\_id)
API route.
### Example
```ts
sdk.admin.return.updateReturnShipping("return_123", "orchach_123", {
custom_amount: 100,
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddReturnShipping](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddReturnShipping/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReturnShipping"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to update the shipping method in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The ID of the shipping method's `SHIPPING_ADD` action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReturnShipping](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReturnShipping/page.mdx)","description":"The details of the shipping method to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"custom_amount","type":"`number`","description":"A custom amount to set for the shipping method.\nIf not provided, the shipping option's fixed or calculated amount will be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to\ndescribe the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReturnShipping"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReturnShipping"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReturnShipping"/>
___
## deleteReturnShipping
This method removes a shipping method from a return request by the ID of the shipping method's `SHIPPING_ADD` action.
Every shipping method has an `actions` property, whose value is an array of actions. You can check the action's name
using its `action` property, and use the value of the `id` property.
For example, `shipping_method.actions.find((action) => action.action === "SHIPPING_ADD")?.id` is
the ID of a shipping method's `SHIPPING_ADD` action.
This method sends a request to the
[Remove Shipping Method from Return](https://docs.medusajs.com/api/admin#returns\_deletereturnsidshippingmethodaction\_id)
API route.
### Example
```ts
sdk.admin.return.deleteReturnShipping("return_123", "orchach_123")
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReturnShipping"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to remove the shipping method from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The ID of the shipping method's `SHIPPING_ADD` action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReturnShipping"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReturnShipping"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteReturnShipping"/>
___
## updateRequest
This method updates a return request. It sends a request to the
[Update Return](https://docs.medusajs.com/api/admin#returns\_postreturnsid)
API route.
### Example
```ts
sdk.admin.return.updateRequest("return_123", {
location_id: "sloc_123",
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReturnRequest](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReturnRequest/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRequest"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReturnRequest](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReturnRequest/page.mdx)","description":"The details of the return to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"location_id","type":"`null` \\| `string`","description":"The ID of the stock location to return the items to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send a notification to the customer\nfor return updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the return.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRequest"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRequest"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRequest"/>
___
## confirmRequest
This method confirms a return request. The return's changes are applied on the inventory quantity of the return
items and the order only after the return has been confirmed as received using the
[Confirm Return Receival](https://docs.medusajs.com/api/admin#returns\_postreturnsidreceiveconfirm)
API route.
This method sends a request to the
[Confirm Return Request](https://docs.medusajs.com/api/admin#returns\_postreturnsidrequest)
API route.
### Example
```ts
sdk.admin.return.confirmRequest("return_123", {
no_notification: true,
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminConfirmReturnRequest](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminConfirmReturnRequest/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmRequest"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to confirm.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminConfirmReturnRequest](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminConfirmReturnRequest/page.mdx)","description":"The details of the return to confirm.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"no_notification","type":"`boolean`","description":"Whether to send a notification to the customer\nfor return updates.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmRequest"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmRequest"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmRequest"/>
___
## initiateReceive
This method starts the return receival process. It sends a request to the
[Start Return Receival](https://docs.medusajs.com/api/admin#returns\_postreturnsidreceive)
API route.
### Example
```ts
sdk.admin.return.initiateReceive("return_123", {
internal_note: "Return received by the customer",
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminInitiateReceiveReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInitiateReceiveReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiateReceive"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to start the receival process.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminInitiateReceiveReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminInitiateReceiveReturn/page.mdx)","description":"The details of the return to start the receival process.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to\ndescribe the return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"A note to describe the return.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the return.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiateReceive"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiateReceive"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="initiateReceive"/>
___
## receiveItems
This method adds received items to a return. These items will have the action `RECEIVE_RETURN_ITEM`.
The method sends a request to the
[Add Received Items](https://docs.medusajs.com/api/admin#returns\_postreturnsidreceiveitems)
API route.
### Example
```ts
sdk.admin.return.receiveItems("return_123", {
items: [
{ id: "item_123", quantity: 1 },
],
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminReceiveItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReceiveItems/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="receiveItems"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to add the received items to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminReceiveItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReceiveItems/page.mdx)","description":"The details of the received items to add to the return.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"`object`[]","description":"The received items in the return.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the received item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The received quantity of the item.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to\ndescribe the received item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="receiveItems"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="receiveItems"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="receiveItems"/>
___
## updateReceiveItem
This method updates a received item in the return by the ID of the item's `RECEIVE_RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name
using its `action` property, and use the value of the `id` property.
For example, `received_item.actions.find((action) => action.action === "RECEIVE_RETURN_ITEM")?.id` is
the ID of a received item's `RECEIVE_RETURN_ITEM` action.
This method sends a request to the
[Update Received Item](https://docs.medusajs.com/api/admin#returns\_postreturnsidreceiveitemsaction\_id)
API route.
### Example
```ts
sdk.admin.return.updateReceiveItem("return_123", "orchach_123", {
quantity: 2,
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReceiveItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReceiveItems/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reason_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReceiveItem"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to update the received item in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The ID of the received item's `RECEIVE_RETURN_ITEM` action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReceiveItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReceiveItems/page.mdx)","description":"The details of the received item to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The received quantity of the item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to\ndescribe the received item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reason_id","type":"`string`","description":"The ID of the return reason to associate with the item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the received item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReceiveItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReceiveItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateReceiveItem"/>
___
## removeReceiveItem
This method removes a received item from the return by the ID of the item's `RECEIVE_RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name
using its `action` property, and use the value of the `id` property.
For example, `received_item.actions.find((action) => action.action === "RECEIVE_RETURN_ITEM")?.id` is
the ID of a received item's `RECEIVE_RETURN_ITEM` action.
This method sends a request to the
[Remove Received Item](https://docs.medusajs.com/api/admin#returns\_deletereturnsidreceiveitemsaction\_id)
API route.
### Example
```ts
sdk.admin.return.removeReceiveItem("return_123", "orchach_123")
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeReceiveItem"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to remove the received item from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The ID of the received item's `RECEIVE_RETURN_ITEM` action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeReceiveItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeReceiveItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeReceiveItem"/>
___
## dismissItems
This method adds damaged items to the return. These items will have the action `RECEIVE_DAMAGED_RETURN_ITEM`.
A damaged item's quantity is not added back to the associated inventory item's quantity in the
stock location where the return is initiated from.
The method sends a request to the
[Add Damaged Items](https://docs.medusajs.com/api/admin#returns\_postreturnsiddismissitems)
API route.
### Example
```ts
sdk.admin.return.dismissItems("return_123", {
items: [
{ id: "orli_123", quantity: 1 },
],
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminDismissItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDismissItems/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"`object`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissItems"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to add the damaged items to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminDismissItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDismissItems/page.mdx)","description":"The details of the damaged items to add to the return.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"`object`[]","description":"The damaged items to add to the return.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item to add to the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"quantity","type":"`number`","description":"The quantity of the item that is damaged.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to\ndescribe the damaged item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissItems"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissItems"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="dismissItems"/>
___
## updateDismissItem
This method updates a damaged item in the return by the ID of the item's `RECEIVE_DAMAGED_RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name
using its `action` property, and use the value of the `id` property.
For example, `item.actions.find((action) => action.action === "RECEIVE_DAMAGED_RETURN_ITEM")?.id` is
the ID of a damaged item's `RECEIVE_DAMAGED_RETURN_ITEM` action.
This method sends a request to the
[Update Damaged Item](https://docs.medusajs.com/api/admin#returns\_postreturnsiddismissitemsaction\_id)
API route.
### Example
```ts
sdk.admin.return.updateDismissItem("return_123", "orchach_123", {
quantity: 2,
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDismissItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDismissItems/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reason_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateDismissItem"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to update the damaged item in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The ID of the damaged item's `RECEIVE_DAMAGED_RETURN_ITEM` action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDismissItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDismissItems/page.mdx)","description":"The details of the damaged item to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The quantity of the item that is damaged.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"A note that is viewed by admins only to","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"reason_id","type":"`string`","description":"The ID of the return reason to associate with the item.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the received item.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateDismissItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateDismissItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateDismissItem"/>
___
## removeDismissItem
This method removes a damaged item from the return by the ID of the item's `RECEIVE_DAMAGED_RETURN_ITEM` action.
Every item has an `actions` property, whose value is an array of actions. You can check the action's name
using its `action` property, and use the value of the `id` property.
For example, `item.actions.find((action) => action.action === "RECEIVE_DAMAGED_RETURN_ITEM")?.id` is
the ID of a damaged item's `RECEIVE_DAMAGED_RETURN_ITEM` action.
This method sends a request to the
[Remove Damaged Item](https://docs.medusajs.com/api/admin#returns\_deletereturnsiddismissitemsaction\_id)
API route.
### Example
```ts
sdk.admin.return.removeDismissItem("return_123", "orchach_123")
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeDismissItem"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to remove the damaged item from.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The ID of the damaged item's `RECEIVE_DAMAGED_RETURN_ITEM` action.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeDismissItem"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeDismissItem"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeDismissItem"/>
___
## confirmReceive
This method confirms the return receival. It sends a request to the
[Confirm Return Receival](https://docs.medusajs.com/api/admin#returns\_postreturnsidreceiveconfirm)
API route.
### Example
```ts
sdk.admin.return.confirmReceive("return_123", {
no_notification: true,
})
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminConfirmReceiveReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminConfirmReceiveReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmReceive"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to confirm the receival of.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminConfirmReceiveReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminConfirmReceiveReturn/page.mdx)","description":"The details of the receival confirmation.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"no_notification","type":"`boolean`","description":"Whether to send a notification to the customer\nfor return updates.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmReceive"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmReceive"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmReceive"/>
___
## cancelReceive
This method cancels a return receival. It sends a request to the
[Cancel Return Receival](https://docs.medusajs.com/api/admin#returns\_deletereturnsidreceive)
API route.
### Example
```ts
sdk.admin.return.cancelReceive("return_123")
.then(({ return }) => {
console.log(return)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelReceive"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the return to cancel the receival of.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelReceive"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelReceive"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return's details.","expandable":false,"children":[{"name":"return","type":"[AdminReturn](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturn/page.mdx)","description":"The return's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminReturnItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnItem/page.mdx)[]","description":"The return's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The return's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_id","type":"`string`","description":"The ID of the order that the return belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_version","type":"`number`","description":"The order's version once the return is applied.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The display ID of the return.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"received_at","type":"`string`","description":"The date when the return was received.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the return was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"canceled_at","type":"`string`","description":"The date when the return was canceled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[ReturnStatus](../../../../../order/types/order.ReturnStatus/page.mdx)","description":"The return's status.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"exchange_id","type":"`string`","description":"The ID of the exchange that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string`","description":"The ID of the stock location that the items are returned to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"claim_id","type":"`string`","description":"The ID of the claim that the return belongs to,\nif available.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"no_notification","type":"`boolean`","description":"Whether to send the customers notifications about\nreturn updates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"refund_amount","type":"`number`","description":"The amount that is to be refunded to the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelReceive"/>
@@ -15,58 +15,174 @@ This documentation provides a reference to the `sdk.admin.returnReason` set of m
## list
This method retrieves a list of return reasons. It sends a request to the
[List Return Reasons](https://docs.medusajs.com/api/admin#return-reasons\_returnreason\_schema)
API route.
### Example
To retrieve the list of return reasons:
```ts
sdk.admin.returnReason.list()
.then(({ return_reasons, count, limit, offset }) => {
console.log(return_reasons)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.returnReason.list({
limit: 10,
offset: 10
})
.then(({ return_reasons, count, limit, offset }) => {
console.log(return_reasons)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each return reason:
```ts
sdk.admin.returnReason.list({
fields: "id,value"
})
.then(({ return_reasons, count, limit, offset }) => {
console.log(return_reasons)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is jLine truncated
<TypeList types={[{"name":"query","type":"[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Apply filters on the return reason's deletion date.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminReturnReasonListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListParams/page.mdx)&#62;)[]","deLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_reasons","type":"[AdminReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReason/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of return reasons.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_reasons","type":"[AdminReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReason/page.mdx)[]","description":"The list of return reasons.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The return reason's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The return reason's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The return reason's label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date that the return reason was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date that the return reason was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The return reason's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## retrieve
This method retrieves a return reason by ID. It sends a request to the
[Get Return Reason](https://docs.medusajs.com/api/admin#return-reasons\_getreturnreasonsid)
API route.
### Example
To retrieve a return reason by its ID:
```ts
sdk.admin.returnReason.retrieve("ret_123")
.then(({ return_reason }) => {
console.log(return_reason)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.returnReason.retrieve("ret_123", {
fields: "id,value"
})
.then(({ return_reason }) => {
console.log(return_reason)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminReturnReasonParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The return reason's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminReturnReasonParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return_reason","type":"[AdminReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReason/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return reason's details.","expandable":false,"children":[{"name":"return_reason","type":"[AdminReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReason/page.mdx)","description":"The return reason's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The return reason's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The return reason's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The return reason's label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date that the return reason was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date that the return reason was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The return reason's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## create
This method creates a return reason. It sends a request to the
[Create Return Reason](https://docs.medusajs.com/api/admin#return-reasons\_postreturnreasons)
API route.
### Example
```ts
sdk.admin.returnReason.create({
value: "refund",
label: "Refund",
})
.then(({ return_reason }) => {
console.log(return_reason)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReturnReason/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminReturnReasonParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[AdminCreateReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateReturnReason/page.mdx)","description":"The details of the return reason to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The return reason's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The return reason's label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The return reason's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_return_reason_id","type":"`string`","description":"The ID of the return reason's parent.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminReturnReasonParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return_reason","type":"[AdminReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReason/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return reason's details.","expandable":false,"children":[{"name":"return_reason","type":"[AdminReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReason/page.mdx)","description":"The return reason's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The return reason's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The return reason's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The return reason's label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date that the return reason was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date that the return reason was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The return reason's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## update
This method updates a return reason. It sends a request to the
[Update Return Reason](https://docs.medusajs.com/api/admin#return-reasons\_postreturnreasonsid)
API route.
### Example
```ts
sdk.admin.returnReason.update("ret_123", {
value: "refund",
label: "Refund",
})
.then(({ return_reason }) => {
console.log(return_reason)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReturnReason/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminReturnReasonParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The return reason's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateReturnReason/page.mdx)","description":"The details of the return reason to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string`","description":"The return reason's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The return reason's label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The return reason's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminReturnReasonParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonParams/page.mdx)","description":"Configure the fields and relations to retrieve in the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"return_reason","type":"[AdminReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReason/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The return reason's details.","expandable":false,"children":[{"name":"return_reason","type":"[AdminReturnReason](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReason/page.mdx)","description":"The return reason's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The return reason's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string`","description":"The return reason's value.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"label","type":"`string`","description":"The return reason's label.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date that the return reason was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date that the return reason was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The return reason's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the return reason.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## delete
This method deletes a return reason. It sends a request to the
[Delete Return Reason](https://docs.medusajs.com/api/admin#return-reasons\_deletereturnreasonsid)
API route.
### Example
```ts
sdk.admin.returnReason.delete("ret_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminReturnReasonParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The return reason's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminReturnReasonParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonParams/page.mdx)","description":"Query parameters to pass to the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"return_reason\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminReturnReasonDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminReturnReasonDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"return_reason\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
@@ -15,82 +15,237 @@ This documentation provides a reference to the `sdk.admin.salesChannel` set of m
## create
This method creates a new sales channel. It sends a request to the
[Create Sales Channel](https://docs.medusajs.com/api/admin#sales-channels\_postsaleschannels)
API route.
### Example
```ts
sdk.admin.salesChannel.create({
name: "Storefront",
})
.then(({ salesChannel }) => {
console.log(salesChannel)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateSalesChannel/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[AdminCreateSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateSalesChannel/page.mdx)","description":"The details of the sales channel to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The sales channel's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The sales channel's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":true,"defaultValue":"`false`","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The sales channel's details.","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"The sales channel's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The sales channel's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The sales channel's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The sales channel's creation date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The sales channel's last updated date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The sales channel's deletion date.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## update
This method updates a sales channel. It sends a request to the
[Update Sales Channel](https://docs.medusajs.com/api/admin#sales-channels\_postsaleschannelsid)
API route.
### Example
```ts
sdk.admin.salesChannel.update(
"sc_123",
{
name: "Storefront",
}
)
.then(({ salesChannel }) => {
console.log(salesChannel)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateSalesChannel/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the sales channel to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateSalesChannel/page.mdx)","description":"The details of the sales channel to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The sales channel's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The sales channel's description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The sales channel's details.","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"The sales channel's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The sales channel's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The sales channel's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The sales channel's creation date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The sales channel's last updated date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The sales channel's deletion date.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## delete
This method deletes a sales channel. It sends a request to the
[Delete Sales Channel](https://docs.medusajs.com/api/admin#sales-channels\_deletesaleschannelsid)
API route.
### Example
```ts
sdk.admin.salesChannel.delete("sc_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the sales channel to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"sales-channel\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"sales-channel\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
___
## retrieve
This method retrieves a sales channel. It sends a request to the
[Retrieve Sales Channel](https://docs.medusajs.com/api/admin#sales-channels\_getsaleschannelsid)
API route.
### Example
To retrieve a sales channel by its ID:
```ts
sdk.admin.salesChannel.retrieve("sc_123")
.then(({ sales_channel }) => {
console.log(sales_channel)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.salesChannel.retrieve("sc_123", {
fields: "id,*products"
})
.then(({ sales_channel }) => {
console.log(sales_channel)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the sales channel to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The sales channel's details.","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"The sales channel's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The sales channel's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The sales channel's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The sales channel's creation date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The sales channel's last updated date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The sales channel's deletion date.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## list
This method retrieves a list of sales channels. It sends a request to the
[List Sales Channels](https://docs.medusajs.com/api/admin#sales-channels\_getsaleschannels)
API route.
### Example
To retrieve the list of sales channels:
```ts
sdk.admin.salesChannel.list()
.then(({ sales_channels, count, limit, offset }) => {
console.log(sales_channels)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.salesChannel.list({
limit: 10,
offset: 10
})
.then(({ sales_channels, count, limit, offset }) => {
console.log(sales_channels)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each sales channel:
```ts
sdk.admin.salesChannel.list({
fields: "id,*products"
})
.then(({ sales_channels, count, limit, offset }) => {
console.log(sales_channels)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"publishable_key_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelLisLine truncated
<TypeList types={[{"name":"query","type":"[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by sales channel ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the sales channel's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by sales channel name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"Filter by sales channel description.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Filter by whether the sales channel is disabled.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"location_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the location(s) to retrieve the\nsales channels for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"publishable_key_id","type":"`string` \\| `string`[]","description":"Filter by the ID(s) of the publishable key(s) to retrieve the\nsales channels for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date when the sales channel was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date when the sales channel was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date when the sales channel was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminSalesChannelListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelListParaLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminSalesChannelListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminSalesChannelListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of sales channels.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## updateProducts
This method manages the products in a sales channel to add or remove them. It sends a request to the
[Manage Products in Sales Channel](https://docs.medusajs.com/api/admin#sales-channels\_postsaleschannelsidproducts)
API route.
### Example
```ts
sdk.admin.salesChannel.updateProducts("sc_123", {
add: ["prod_123", "prod_456"],
remove: ["prod_789"]
})
.then(({ sales_channel }) => {
console.log(sales_channel)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateSalesChannelProducts](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateSalesChannelProducts/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProducts"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the sales channel to manage the products for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateSalesChannelProducts](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateSalesChannelProducts/page.mdx)","description":"The details of the products to add or remove from the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the products to add to the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the products to remove from the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProducts"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The sales channel's details.","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"The sales channel's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The sales channel's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The sales channel's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The sales channel's creation date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The sales channel's last updated date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The sales channel's deletion date.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateProducts"/>
:::note[Deprecated]
Use [batchProducts](../../../SalesChannel/methods/js_sdk.admin.SalesChannel.batchProducts/page.mdx) instead
:::
___
## batchProducts
This method manages the products in a sales channel to add or remove them. It sends a request to the
[Manage Products in Sales Channel](https://docs.medusajs.com/api/admin#sales-channels\_postsaleschannelsidproducts)
API route.
### Example
```ts
sdk.admin.salesChannel.batchProducts("sc_123", {
add: ["prod_123", "prod_456"],
remove: ["prod_789"]
})
.then(({ sales_channel }) => {
console.log(sales_channel)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchProducts"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the sales channel to manage the products for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateSalesChannelProducts](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateSalesChannelProducts/page.mdx)","description":"The details of the products to add or remove from the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the products to add to the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the products to remove from the sales channel.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchProducts"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchProducts"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminSalesChannelResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannelResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The sales channel's details.","expandable":false,"children":[{"name":"sales_channel","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)","description":"The sales channel's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The sales channel's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The sales channel's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"The sales channel's description.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_disabled","type":"`boolean`","description":"Whether the sales channel is disabled.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the sales channel.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The sales channel's creation date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The sales channel's last updated date.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The sales channel's deletion date.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchProducts"/>
@@ -15,70 +15,200 @@ This documentation provides a reference to the `sdk.admin.shippingOption` set of
## create
This method creates a shipping option. It sends a request to the
[Create Shipping Option](https://docs.medusajs.com/api/admin#shipping-options\_postshippingoptions)
API route.
### Example
```ts
sdk.admin.shippingOption.create({
name: "Standard Shipping",
profile_id: "shp_123",
})
.then(({ shipping_option }) => {
console.log(shipping_option)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOption/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The shipping option's price type.\n\n- Use \n\n`calculated`\n\n if the shipping option's price amount is calculated by the fulfillment provider.\n- Use \n\n`flat_rate`\n\n if the shipping option's price is always the same amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminCreateShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"([AdminCreateShippingOptionPriceWithCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionPriceWithCurrency/page.mdx) \\| [AdminCreateShippingOptionPriceWithRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionPriceWithRegion/page.mdx))[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminShippingOptionPriceRulePayload](../../../../../types/interfaces/types.AdminShippingOptionPriceRulePayload/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"operator","type":"[RuleOperatorType](../../../../../types/CommonTypes/types/types.CommonTypes.RuleOperatorType/page.mdx)","description":"The accepted values for the shipping rule option's operator.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[AdminCreateShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOption/page.mdx)","description":"The details of the shipping option to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping option. Customers can\nview this name during checkout.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The ID of the service zone that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#service-zone-restrictions)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the shipping profile that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider that the shipping option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminCreateShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionType/page.mdx)","description":"The type of shipping option.\n\nLearn more in the [Shipping Option](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"([AdminCreateShippingOptionPriceWithCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionPriceWithCurrency/page.mdx) \\| [AdminCreateShippingOptionPriceWithRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionPriceWithRegion/page.mdx))[]","description":"The prices of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency code of the shipping option price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount of the shipping option price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region that the shipping option price belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminShippingOptionPriceRulePayload](../../../../../types/interfaces/types.AdminShippingOptionPriceRulePayload/page.mdx)[]","description":"The rules of the shipping option price that\nindicate when the price should be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"data","type":"`Record<string, unknown>`","description":"Additional data that is useful for third-party fulfillment providers\nthat process fulfillments for the shipping option.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property)\ndocumentation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionRule/page.mdx)[]","description":"The rules of the shipping option.\n\nLearn more in the [Shipping Option Rules](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-option-rules)\ndocumentation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"operator","type":"[RuleOperatorType](../../../../../types/CommonTypes/types/types.CommonTypes.RuleOperatorType/page.mdx)","description":"The operator of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"aLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_option","type":"[AdminShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOption/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The shipping option's price type.\n\n- Use \n\n`calculated`\n\n if the shipping option's price amount is calculated by the fulfillment provider.\n- Use \n\n`flat_rate`\n\n if the shipping option's price is always the same amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[AdminServiceZone](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminServiceZone/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[AdminShippingOptionPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionPrice/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping option's details.","expandable":false,"children":[{"name":"shipping_option","type":"[AdminShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOption/page.mdx)","description":"The shipping option's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The shipping option's name. Customers can\nsee this name during checkout.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The ID of the service zone that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#service-zone-restrictions)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[AdminServiceZone](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminServiceZone/page.mdx)","description":"The service zone that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#service-zone-restrictions)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider that the shipping option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The fulfillment provider that the shipping option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The ID of the shipping option's type.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionType/page.mdx)","description":"The shipping option's type.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the shipping profile that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"The shipping profile that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionRule/page.mdx)[]","description":"The rules of the shipping option.\n\nLearn more in the [Shipping Option Rules](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-option-rules)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[AdminShippingOptionPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionPrice/page.mdx)[]","description":"The prices of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Additional data that is useful for third-party fulfillment providers\nthat process fulfillments for the shipping option.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resourceLine truncated
___
## retrieve
This method retrieves a shipping option. It sends a request to the
[Get Shipping Option](https://docs.medusajs.com/api/admin#shipping-options\_getshippingoptionsid)
API route.
### Example
To retrieve a shipping option by its ID:
```ts
sdk.admin.shippingOption.retrieve("so_123")
.then(({ shipping_option }) => {
console.log(shipping_option)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.shippingOption.retrieve("so_123", {
fields: "id,*service_zone"
})
.then(({ shipping_option }) => {
console.log(shipping_option)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping option to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_option","type":"[AdminShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOption/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The shipping option's price type.\n\n- Use \n\n`calculated`\n\n if the shipping option's price amount is calculated by the fulfillment provider.\n- Use \n\n`flat_rate`\n\n if the shipping option's price is always the same amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[AdminServiceZone](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminServiceZone/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[AdminShippingOptionPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionPrice/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping option's details.","expandable":false,"children":[{"name":"shipping_option","type":"[AdminShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOption/page.mdx)","description":"The shipping option's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The shipping option's name. Customers can\nsee this name during checkout.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The ID of the service zone that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#service-zone-restrictions)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[AdminServiceZone](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminServiceZone/page.mdx)","description":"The service zone that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#service-zone-restrictions)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider that the shipping option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The fulfillment provider that the shipping option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The ID of the shipping option's type.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionType/page.mdx)","description":"The shipping option's type.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the shipping profile that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"The shipping profile that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionRule/page.mdx)[]","description":"The rules of the shipping option.\n\nLearn more in the [Shipping Option Rules](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-option-rules)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[AdminShippingOptionPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionPrice/page.mdx)[]","description":"The prices of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Additional data that is useful for third-party fulfillment providers\nthat process fulfillments for the shipping option.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resourceLine truncated
___
## update
This method updates a shipping option. It sends a request to the
[Update Shipping Option](https://docs.medusajs.com/api/admin#shipping-options\_postshippingoptionsid)
API route.
### Example
```ts
sdk.admin.shippingOption.update("so_123", {
name: "Standard Shipping",
})
.then(({ shipping_option }) => {
console.log(shipping_option)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOption/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The shipping option's price type.\n\n- Use \n\n`calculated`\n\n if the shipping option's price amount is calculated by the fulfillment provider.\n- Use \n\n`flat_rate`\n\n if the shipping option's price is always the same amount.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminCreateShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionType/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"([AdminUpdateShippingOptionPriceWithCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOptionPriceWithCurrency/page.mdx) \\| [AdminUpdateShippingOptionPriceWithRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOptionPriceWithRegion/page.mdx))[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"[AdminShippingOptionPriceRulePayload](../../../../../types/interfaces/types.AdminShippingOptionPriceRulePayload/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules","type":"([AdminCreateShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionRule/page.mdx) \\| [AdminUpdateShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOptionRule/page.mdx))[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"operator","type":"[RuleOperatorType](../../../../../types/CommonTypes/types/types.CommonTypes.RuleOperatorType/page.mdx)","description":"The accepted values for the shipping rule option's operator.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"attribute","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"value","type":"`string` \\| `string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-Line truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping option to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOption/page.mdx)","description":"The details of the shipping option to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping option. Customers can\nview this name during checkout.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`Record<string, unknown>`","description":"Additional data that is useful for third-party fulfillment providers\nthat process fulfillments for the shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of shipping option's price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider that the shipping option belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the shipping profile that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminCreateShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionType/page.mdx)","description":"The type of shipping option.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"label","type":"`string`","description":"The label of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"The description of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the shipping option type.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"prices","type":"([AdminUpdateShippingOptionPriceWithCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOptionPriceWithCurrency/page.mdx) \\| [AdminUpdateShippingOptionPriceWithRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOptionPriceWithRegion/page.mdx))[]","description":"The prices of the shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"rules","type":"[AdminShippingOptionPriceRulePayload](../../../../../types/interfaces/types.AdminShippingOptionPriceRulePayload/page.mdx)[]","description":"The rules of the shipping option price that\nindicate when the price should be applied.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The ID of the shipping option price that is being updated.\nIf not provided, a new shipping option price will be created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency code of the shipping option price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"amount","type":"`number`","description":"The amount of the shipping option price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region that the shipping option price belongs to.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"rules","type":"([AdminCreateShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingOptionRule/page.mdx) \\| [AdminUpdateShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOptionRule/page.mdx))[]","description":"The rules of the shipping option.\n\nLearn more in the [Shipping Option Rules](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-option-rules)\ndocumentation.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"operator","type":"[RuleOperatorType](../../../../../types/CommonTypes/types/types.CommonTypes.RuleOperatorType/page.mdx)","description":"The operator of the shipping option rule.","optional":false,"defaultValue":"","expandable":false,"children":[Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_option","type":"[AdminShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOption/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The shipping option's price type.\n\n- Use \n\n`calculated`\n\n if the shipping option's price amount is calculated by the fulfillment provider.\n- Use \n\n`flat_rate`\n\n if the shipping option's price is always the same amount.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[AdminServiceZone](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminServiceZone/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionType/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[AdminShippingOptionPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionPrice/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping option's details.","expandable":false,"children":[{"name":"shipping_option","type":"[AdminShippingOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOption/page.mdx)","description":"The shipping option's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The shipping option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The shipping option's name. Customers can\nsee this name during checkout.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"price_type","type":"[ShippingOptionPriceType](../../../../../fulfillment/types/fulfillment.ShippingOptionPriceType/page.mdx)","description":"The type of shipping option's price.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"The ID of the service zone that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#service-zone-restrictions)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone","type":"[AdminServiceZone](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminServiceZone/page.mdx)","description":"The service zone that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#service-zone-restrictions)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"The ID of the fulfillment provider that the shipping option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"provider","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)","description":"The fulfillment provider that the shipping option belongs to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`null` \\| `string`","description":"The ID of the shipping option's type.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"[AdminShippingOptionType](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionType/page.mdx)","description":"The shipping option's type.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"The ID of the shipping profile that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"The shipping profile that the shipping option belongs to.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-profile-and-types)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminShippingOptionRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionRule/page.mdx)[]","description":"The rules of the shipping option.\n\nLearn more in the [Shipping Option Rules](https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#shipping-option-rules)\ndocumentation.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"prices","type":"[AdminShippingOptionPrice](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionPrice/page.mdx)[]","description":"The prices of the shipping option.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"data","type":"`null` \\| `Record<string, unknown>`","description":"Additional data that is useful for third-party fulfillment providers\nthat process fulfillments for the shipping option.\n\nLearn more in the [Shipping Options](https://docs.medusajs.com/resourceLine truncated
___
## delete
This method deletes a shipping option. It sends a request to the
[Delete Shipping Option](https://docs.medusajs.com/api/admin#shipping-options\_deleteshippingoptionsid)
API route.
### Example
```ts
sdk.admin.shippingOption.delete("so_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping option to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"shipping_option\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"shipping_option\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
___
## list
This method retrieves a list of shipping options. It sends a request to the
[List Shipping Options](https://docs.medusajs.com/api/admin#shipping-options\_getshippingoptions)
API route.
### Example
To retrieve the list of shipping options:
```ts
sdk.admin.shippingOption.list()
.then(({ shipping_options, count, limit, offset }) => {
console.log(shipping_options)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.shippingOption.list({
limit: 10,
offset: 10
})
.then(({ shipping_options, count, limit, offset }) => {
console.log(shipping_options)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each shipping option:
```ts
sdk.admin.shippingOption.list({
fields: "id,*service_zone"
})
.then(({ shipping_options, count, limit, offset }) => {
console.log(shipping_options)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminShippingOptionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stock_location_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"admin_only","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"childrLine truncated
<TypeList types={[{"name":"query","type":"[AdminShippingOptionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by shipping option ID(s),","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the shipping option's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string` \\| `string`[]","description":"Filter by the ID of the service zone(s) to retrieve the shipping options for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"stock_location_id","type":"`string` \\| `string`[]","description":"Filter by the ID of the stock location(s) to retrieve the shipping options for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Filter by whether the shipping option is a return shipping option.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"admin_only","type":"`boolean`","description":"Filter by whether the shipping option is only available to admins.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string` \\| `string`[]","description":"Filter by the ID of the shipping profile(s) to retrieve the shipping options for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string` \\| `string`[]","description":"Filter by the ID of the provider(s) to retrieve the shipping options for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`string` \\| `string`[]","description":"Filter by the ID of the shipping option type(s) to retrieve the shipping options for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the shipping option was created.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt"Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminShippingOptionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingOptionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminShippingOptionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of shipping options.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## updateRules
This method manages the rules of a shipping option to create, update, or remove them. It sends a request to the
[Manage Rules of a Shipping Option](https://docs.medusajs.com/api/admin#shipping-options\_postshippingoptionsidrulesbatch)
API route.
### Example
```ts
sdk.admin.shippingOption.updateRules("so_123", {
create: [{ attribute: "enabled_in_store", operator: "eq", value: "true" }],
})
.then(({ shipping_option }) => {
console.log(shipping_option)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateShippingOptionRules](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOptionRules/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"create","type":"`any`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`any`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"delete","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRules"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping option to manage the rules for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateShippingOptionRules](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingOptionRules/page.mdx)","description":"The details of the shipping option rules to manage.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"create","type":"`any`[]","description":"The rules to create.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"update","type":"`any`[]","description":"The rules to update.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"delete","type":"`string`[]","description":"The rules to delete.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRules"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUpdateShippingOptionRulesResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminUpdateShippingOptionRulesResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"created","type":"T[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated","type":"T[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`object`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRules"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUpdateShippingOptionRulesResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminUpdateShippingOptionRulesResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping option's details.","expandable":false,"children":[{"name":"created","type":"T[]","description":"The items that were created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated","type":"T[]","description":"The items that were updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`object`","description":"Details of the items that were deleted.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"ids","type":"`string`[]","description":"The IDs of the items that were deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`string`","description":"The type of the items that were deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the items were deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateRules"/>
@@ -15,58 +15,172 @@ This documentation provides a reference to the `sdk.admin.shippingProfile` set o
## create
This method creates a new shipping profile. It sends a request to the
[Create Shipping Profile](https://docs.medusajs.com/api/admin#shipping-profiles\_postshippingprofiles)
API route.
### Example
```ts
sdk.admin.shippingProfile.create({
name: "Default Shipping Profile",
})
.then(({ shipping_profile }) => {
console.log(shipping_profile)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingProfile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[AdminCreateShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateShippingProfile/page.mdx)","description":"The details of the shipping profile to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping profile's details.","expandable":false,"children":[{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"The shipping profile's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the shipping profile was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date when the shipping profile was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date when the shipping profile was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## update
This method updates a shipping profile. It sends a request to the
[Update Shipping Profile](https://docs.medusajs.com/api/admin#shipping-profiles\_postshippingprofilesid)
API route.
### Example
```ts
sdk.admin.shippingProfile.update("sp_123", {
name: "Updated Shipping Profile",
})
.then(({ shipping_profile }) => {
console.log(shipping_profile)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingProfile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping profile to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateShippingProfile/page.mdx)","description":"The details of the shipping profile to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping profile's details.","expandable":false,"children":[{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"The shipping profile's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the shipping profile was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date when the shipping profile was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date when the shipping profile was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## delete
This method deletes a shipping profile. It sends a request to the
[Delete Shipping Profile](https://docs.medusajs.com/api/admin#shipping-profiles\_deleteshippingprofilesid)
API route.
### Example
```ts
sdk.admin.shippingProfile.delete("sp_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping profile to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"shipping_profile\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"shipping_profile\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
___
## list
This method retrieves a list of shipping profiles. It sends a request to the
[List Shipping Profiles](https://docs.medusajs.com/api/admin#shipping-profiles\_getshippingprofiles)
API route.
### Example
To retrieve the list of shipping profiles:
```ts
sdk.admin.shippingProfile.list()
.then(({ shipping_profiles, count, limit, offset }) => {
console.log(shipping_profiles)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.shippingProfile.list({
limit: 10,
offset: 10
})
.then(({ shipping_profiles, count, limit, offset }) => {
console.log(shipping_profiles)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each shipping profile:
```ts
sdk.admin.shippingProfile.list({
fields: "id,name"
})
.then(({ shipping_profiles, count, limit, offset }) => {
console.log(shipping_profiles)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminShippingProfileListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;sLine truncated
<TypeList types={[{"name":"query","type":"[AdminShippingProfileListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by shipping profile ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the shipping profile's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"Filter by shipping profile type.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"Filter by shipping profile name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the shipping profile was created.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminShippingProfileListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminShippingProfileListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of shipping profiles.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## retrieve
This method retrieves a shipping profile. It sends a request to the
[Get Shipping Profile](https://docs.medusajs.com/api/admin#shipping-profiles\_getshippingprofilesid)
API route.
### Example
To retrieve a shipping profile by its ID:
```ts
sdk.admin.shippingProfile.retrieve("sp_123")
.then(({ shipping_profile }) => {
console.log(shipping_profile)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.shippingProfile.retrieve("sp_123", {
fields: "id,name"
})
.then(({ shipping_profile }) => {
console.log(shipping_profile)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the shipping profile to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the shipping profile.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminShippingProfileResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfileResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The shipping profile's details.","expandable":false,"children":[{"name":"shipping_profile","type":"[AdminShippingProfile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingProfile/page.mdx)","description":"The shipping profile's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the shipping profile.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date when the shipping profile was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date when the shipping profile was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date when the shipping profile was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
@@ -15,94 +15,257 @@ This documentation provides a reference to the `sdk.admin.stockLocation` set of
## create
This method creates a new stock location. It sends a request to the
[Create Stock Location](https://docs.medusajs.com/api/admin#stock-locations\_poststocklocations)
API route.
### Example
```ts
sdk.admin.stockLocation.create({
name: "Main Warehouse",
address_id: "addr_123",
})
.then(({ stock_location }) => {
console.log(stock_location)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateStockLocation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminUpsertStockLocationAddress](../../../../../types/interfaces/types.AdminUpsertStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[AdminCreateStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateStockLocation/page.mdx)","description":"The details of the stock location to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address to associate with the stock location.\nIf you provide an `address`, you don't need to provide this property.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminUpsertStockLocationAddress](../../../../../types/interfaces/types.AdminUpsertStockLocationAddress/page.mdx)","description":"The address to create or update for the stock location.\nIf you provide an `address_id`, you don't need\nto provide this property.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company name associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal or zip code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province or state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The stock location's details.","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"The stock location's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address associated with the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"The address associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"The sales channels associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"The fulfillment providers associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"The fulfillment sets associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## update
This method updates a stock location. It sends a request to the
[Update Stock Location](https://docs.medusajs.com/api/admin#stock-locations\_poststocklocationsid)
API route.
### Example
```ts
sdk.admin.stockLocation.update("sloc_123", {
name: "European Warehouse",
})
.then(({ stock_location }) => {
console.log(stock_location)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateStockLocation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminUpsertStockLocationAddress](../../../../../types/interfaces/types.AdminUpsertStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the stock location to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateStockLocation/page.mdx)","description":"The details of the stock location to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address to associate with the stock location.\nIf you provide an `address`, you don't need to provide this property.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminUpsertStockLocationAddress](../../../../../types/interfaces/types.AdminUpsertStockLocationAddress/page.mdx)","description":"The address to create or update for the stock location.\nIf you provide an `address_id`, you don't need\nto provide this property.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"address_1","type":"`string`","description":"The first line of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company name associated with the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal or zip code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province or state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The stock location's details.","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"The stock location's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address associated with the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"The address associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"The sales channels associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"The fulfillment providers associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"The fulfillment sets associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## delete
This method deletes a stock location. It sends a request to the
[Delete Stock Location](https://docs.medusajs.com/api/admin#stock-locations\_deletestocklocationsid)
API route.
### Example
```ts
sdk.admin.stockLocation.delete("sloc_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the stock location to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"stock_location\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"stock_location\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
___
## retrieve
This method retrieves a stock location. It sends a request to the
[Get Stock Location](https://docs.medusajs.com/api/admin#stock-locations\_getstocklocationsid)
API route.
### Example
To retrieve a stock location by its ID:
```ts
sdk.admin.stockLocation.retrieve("sloc_123")
.then(({ stock_location }) => {
console.log(stock_location)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.stockLocation.retrieve("sloc_123", {
fields: "id,*sales_channels"
})
.then(({ stock_location }) => {
console.log(stock_location)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the stock location to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The stock location's details.","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"The stock location's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address associated with the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"The address associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"The sales channels associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"The fulfillment providers associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"The fulfillment sets associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## list
This method retrieves a list of stock locations. It sends a request to the
[List Stock Locations](https://docs.medusajs.com/api/admin#stock-locations\_getstocklocations)
API route.
### Example
To retrieve the list of stock locations:
```ts
sdk.admin.stockLocation.list()
.then(({ stock_locations, count, limit, offset }) => {
console.log(stock_locations)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.stockLocation.list({
limit: 10,
offset: 10
})
.then(({ stock_locations, count, limit, offset }) => {
console.log(stock_locations)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each stock location:
```ts
sdk.admin.stockLocation.list({
fields: "id,*sales_channels"
})
.then(({ stock_locations, count, limit, offset }) => {
console.log(stock_locations)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$and","type":"[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)[]","description":"An array of filters tLine truncated
<TypeList types={[{"name":"query","type":"[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by stock location ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the stock location's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by stock location name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string` \\| `string`[]","description":"Filter by stock location address ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string` \\| `string`[]","description":"Filter by sales channel ID(s) to retrieve the stock locations for.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the stock location was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the stock location was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the stock location was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStockLocationListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":tLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stock_locations","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of stock locations.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stock_locations","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)[]","description":"The list of stock locations.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address associated with the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"The address associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"The sales channels associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"The fulfillment providers associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"The fulfillment sets associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## updateSalesChannels
This method manages the sales channels of a stock location by adding or removing them. It sends a request to the
[Manage Stock Location Sales Channels](https://docs.medusajs.com/api/admin#stock-locations\_poststocklocationsidsaleschannels)
API route.
### Example
```ts
sdk.admin.stockLocation.updateSalesChannels("sloc_123", {
add: ["sc_123"],
remove: ["sc_456"],
})
.then(({ stock_location }) => {
console.log(stock_location)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateStockLocationSalesChannels](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateStockLocationSalesChannels/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannels"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the stock location to update the sales channels for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateStockLocationSalesChannels](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateStockLocationSalesChannels/page.mdx)","description":"The details of the sales channels to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the sales channels to add to the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the sales channels to remove from the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannels"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannels"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The stock location's details.","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"The stock location's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address associated with the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"The address associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"The sales channels associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"The fulfillment providers associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"The fulfillment sets associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateSalesChannels"/>
___
## createFulfillmentSet
This method adds a new fulfillment set to a stock location. It sends a request to the
[Add Fulfillment Set to Stock Location](https://docs.medusajs.com/api/admin#stock-locations\_poststocklocationsidfulfillmentsets)
API route.
### Example
```ts
sdk.admin.stockLocation.createFulfillmentSet("sloc_123", {
name: "Shipping",
type: "shipping",
})
.then(({ stock_location }) => {
console.log(stock_location)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminCreateStockLocationFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateStockLocationFulfillmentSet/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillmentSet"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the stock location to add the fulfillment set to.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminCreateStockLocationFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateStockLocationFulfillmentSet/page.mdx)","description":"The details of the fulfillment set to add.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"type","type":"`string`","description":"The type of the fulfillment set.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillmentSet"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillmentSet"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The stock location's details.","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"The stock location's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address associated with the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"The address associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"The sales channels associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"The fulfillment providers associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"The fulfillment sets associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createFulfillmentSet"/>
___
## updateFulfillmentProviders
This method manages the fulfillment providers of a stock location by adding or removing them. It sends a request to the
[Manage Fulfillment Providers of Stock Location](https://docs.medusajs.com/api/admin#stock-locations\_poststocklocationsidfulfillmentproviders)
API route.
### Example
```ts
sdk.admin.stockLocation.updateFulfillmentProviders("sloc_123", {
add: ["fp_manual_manual"],
remove: ["fp_shipstation_shipstation"],
})
.then(({ stock_location }) => {
console.log(stock_location)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateFulfillmentProviders"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the stock location to manage the fulfillment providers for.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The details of the fulfillment providers to manage.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateFulfillmentProviders"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateFulfillmentProviders"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStockLocationResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The stock location's details.","expandable":false,"children":[{"name":"stock_location","type":"[AdminStockLocation](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocation/page.mdx)","description":"The stock location's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address_id","type":"`string`","description":"The ID of the address associated with the stock location.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"address","type":"[AdminStockLocationAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStockLocationAddress/page.mdx)","description":"The address associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channels","type":"[AdminSalesChannel](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminSalesChannel/page.mdx)[]","description":"The sales channels associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_providers","type":"[AdminFulfillmentProvider](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProvider/page.mdx)[]","description":"The fulfillment providers associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_sets","type":"[AdminFulfillmentSet](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentSet/page.mdx)[]","description":"The fulfillment sets associated with the stock location.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateFulfillmentProviders"/>
@@ -15,34 +15,120 @@ This documentation provides a reference to the `sdk.admin.store` set of methods
## retrieve
This method retrieves a store by its ID. It sends a request to the
[Get Store](https://docs.medusajs.com/api/admin#stores\_getstoresid)
API route.
### Example
To retrieve a store by its ID:
```ts
sdk.admin.store.retrieve("store_123")
.then(({ store }) => {
console.log(store)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.store.retrieve("store_123", {
fields: "id,*supported_currencies"
})
.then(({ store }) => {
console.log(store)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminStoreParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the store to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminStoreParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreParams/page.mdx)","description":"Configure the fields and relations to retrieve in the store.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStoreResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"store","type":"[AdminStore](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStore/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[AdminStoreCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreCurrency/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_sales_channel_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStoreResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The store's details.","expandable":false,"children":[{"name":"store","type":"[AdminStore](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStore/page.mdx)","description":"The store's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The store's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The store's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[AdminStoreCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreCurrency/page.mdx)[]","description":"The store's supported currencies.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_sales_channel_id","type":"`null` \\| `string`","description":"The store's default sales channel ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`null` \\| `string`","description":"The store's default region ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`null` \\| `string`","description":"The store's default location ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the store was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the store was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## list
This method retrieves a list of stores. It sends a request to the
[List Stores](https://docs.medusajs.com/api/admin#stores\_getstores)
API route.
### Example
To retrieve the list of stores:
```ts
sdk.admin.store.list()
.then(({ stores, count, limit, offset }) => {
console.log(stores)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.store.list({
limit: 10,
offset: 10
})
.then(({ stores, count, limit, offset }) => {
console.log(stores)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each store:
```ts
sdk.admin.store.list({
fields: "id,*supported_currencies"
})
.then(({ stores, count, limit, offset }) => {
console.log(stores)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":Line truncated
<TypeList types={[{"name":"query","type":"[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the store's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by store ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string` \\| `string`[]","description":"Filter by store name.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminStoreListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStoreListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stores","type":"[AdminStore](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStore/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[AdminStoreCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreCurrency/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_sales_channel_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStoreListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of stores.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"stores","type":"[AdminStore](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStore/page.mdx)[]","description":"The list of stores.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The store's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The store's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[AdminStoreCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreCurrency/page.mdx)[]","description":"The store's supported currencies.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_sales_channel_id","type":"`null` \\| `string`","description":"The store's default sales channel ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`null` \\| `string`","description":"The store's default region ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`null` \\| `string`","description":"The store's default location ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the store was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the store was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## update
This method updates a store. It sends a request to the
[Update Store](https://docs.medusajs.com/api/admin#stores\_poststoresid)
API route.
### Example
```ts
sdk.admin.store.update("store_123", {
name: "My Store",
})
.then(({ store }) => {
console.log(store)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateStore](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateStore/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[AdminUpdateStoreSupportedCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateStoreSupportedCurrency/page.mdx)[]","description":"The supported currencies of the store.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency's ISO 3 code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether this currency is the default currency in the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether prices in this currency are tax inclusive.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/pricing/tax-inclusive-pricing).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`null` \\| `string`","description":"The ID of the default sales channel of the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`null` \\| `string`","description":"The ID of the default region of the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`null` \\| `string`","description":"The ID of the default stock location of the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs to store custom data in the store.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the store to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateStore](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateStore/page.mdx)","description":"The details of the store to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[AdminUpdateStoreSupportedCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateStoreSupportedCurrency/page.mdx)[]","description":"The supported currencies of the store.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"currency_code","type":"`string`","description":"The currency's ISO 3 code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether this currency is the default currency in the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_tax_inclusive","type":"`boolean`","description":"Whether prices in this currency are tax inclusive.\n\nLearn more in [this documentation](https://docs.medusajs.com/resources/commerce-modules/pricing/tax-inclusive-pricing).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"default_sales_channel_id","type":"`null` \\| `string`","description":"The ID of the default sales channel of the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`null` \\| `string`","description":"The ID of the default region of the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`null` \\| `string`","description":"The ID of the default stock location of the store.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs to store custom data in the store.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the store.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStoreResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"store","type":"[AdminStore](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStore/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[AdminStoreCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreCurrency/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_sales_channel_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminStoreResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The store's details.","expandable":false,"children":[{"name":"store","type":"[AdminStore](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStore/page.mdx)","description":"The store's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The store's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The store's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"supported_currencies","type":"[AdminStoreCurrency](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminStoreCurrency/page.mdx)[]","description":"The store's supported currencies.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_sales_channel_id","type":"`null` \\| `string`","description":"The store's default sales channel ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_region_id","type":"`null` \\| `string`","description":"The store's default region ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_location_id","type":"`null` \\| `string`","description":"The store's default location ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, any>`","description":"Custom key-value pairs that can be added to the store.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the store was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the store was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
@@ -15,58 +15,176 @@ This documentation provides a reference to the `sdk.admin.taxRate` set of method
## create
This method creates a tax rate. It sends a request to the
[Create Tax Rate](https://docs.medusajs.com/api/admin#tax-rates\_posttaxrates)
API route.
### Example
```ts
sdk.admin.taxRate.create({
name: "VAT",
tax_region_id: "txreg_123",
code: "VAT",
rate: 2, // 2%
})
.then(({ tax_rate }) => {
console.log(tax_rate)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateTaxRateRule](../../../../../types/interfaces/types.AdminCreateTaxRateRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[AdminCreateTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateTaxRate/page.mdx)","description":"The details of the tax rate to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The code of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The rate of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateTaxRateRule](../../../../../types/interfaces/types.AdminCreateTaxRateRule/page.mdx)[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The name of the table that the rule references.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record in the table that the rule references.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The tax rate's details.","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"The tax rate's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The tax rate's percentage rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The tax rate's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The tax rate's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the tax rate was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the tax rate was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"The date the tax rate was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user who created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"The rules associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## update
This method updates a tax rate. It sends a request to the
[Update Tax Rate](https://docs.medusajs.com/api/admin#tax-rates\_posttaxratesid)
API route.
### Example
```ts
sdk.admin.taxRate.update("txrat_123", {
name: "VAT",
code: "VAT",
})
.then(({ tax_rate }) => {
console.log(tax_rate)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateTaxRateRule](../../../../../types/interfaces/types.AdminCreateTaxRateRule/page.mdx)[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the tax rate to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateTaxRate/page.mdx)","description":"The details of the tax rate to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The percentage rate of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminCreateTaxRateRule](../../../../../types/interfaces/types.AdminCreateTaxRateRule/page.mdx)[]","description":"The rules of the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"reference","type":"`string`","description":"The name of the table that the rule references.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`string`","description":"The ID of the record in the table that the rule references.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The tax rate's details.","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"The tax rate's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The tax rate's percentage rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The tax rate's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The tax rate's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the tax rate was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the tax rate was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"The date the tax rate was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user who created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"The rules associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## delete
This method deletes a tax rate. It sends a request to the
[Delete Tax Rate](https://docs.medusajs.com/api/admin#tax-rates\_deletetaxratesid)
API route.
### Example
```ts
sdk.admin.taxRate.delete("txrat_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the tax rate to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"tax_rate\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"tax_rate\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
___
## retrieve
This method retrieves a tax rate. It sends a request to the
[Get Tax Rate](https://docs.medusajs.com/api/admin#tax-rates\_gettaxratesid)
API route.
### Example
To retrieve a tax rate by its ID:
```ts
sdk.admin.taxRate.retrieve("txrat_123")
.then(({ tax_rate }) => {
console.log(tax_rate)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.taxRate.retrieve("txrat_123", {
fields: "id,*tax_region"
})
.then(({ tax_rate }) => {
console.log(tax_rate)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the tax rate to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The tax rate's details.","expandable":false,"children":[{"name":"tax_rate","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)","description":"The tax rate's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The tax rate's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`null` \\| `number`","description":"The tax rate's percentage rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"code","type":"`string`","description":"The tax rate's code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The tax rate's name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string`","description":"The ID of the tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the tax rate is combinable with other tax rates.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`boolean`","description":"Whether the tax rate is the default tax rate in its tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the tax rate was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the tax rate was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null`","description":"The date the tax rate was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user who created the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The tax region associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rules","type":"[AdminTaxRateRule](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateRule/page.mdx)[]","description":"The rules associated with the tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## list
This method retrieves a list of tax rates. It sends a request to the
[List Tax Rates](https://docs.medusajs.com/api/admin#tax-rates\_gettaxrates)
API route.
### Example
To retrieve the list of tax rates:
```ts
sdk.admin.taxRate.list()
.then(({ tax_rates, count, limit, offset }) => {
console.log(tax_rates)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.taxRate.list({
limit: 10,
offset: 10
})
.then(({ tax_rates, count, limit, offset }) => {
console.log(tax_rates)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each tax rate:
```ts
sdk.admin.taxRate.list({
fields: "id,*tax_region"
})
.then(({ tax_rates, count, limit, offset }) => {
console.log(tax_rates)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`\"true\"` \\| `\"false\"`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypesLine truncated
<TypeList types={[{"name":"query","type":"[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRateListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRateListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the tax rate's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_region_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by tax region ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default","type":"`\"true\"` \\| `\"false\"`","description":"Filter by whether the tax rate is the default tax rate in its tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"service_zone_id","type":"`string`","description":"Filter by service zone ID(s) to retrieve tax rates that are associated with the service zones.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_profile_id","type":"`string`","description":"Filter by shipping profile ID(s) to retrieve tax rates that are associated with the shipping profiles.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"provider_id","type":"`string`","description":"Filter by tax provider ID(s) to retrieve tax rates that are associated with the providers.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_option_type_id","type":"`string`","description":"Filter by shipping option type ID(s) to retrieve tax rates that are associated with the shipping option types.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the tax rate was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the tax rate was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the tax rate was deleted."Line truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminTaxRateListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRateListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminTaxRateListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of tax rates.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
@@ -15,46 +15,152 @@ This documentation provides a reference to the `sdk.admin.taxRegion` set of meth
## create
This method creates a tax region. It sends a request to the
[Create Tax Region](https://docs.medusajs.com/api/admin#tax-regions\_posttaxregions)
API route.
### Example
```ts
sdk.admin.taxRegion.create({
country_code: "us",
province_code: "ca",
default_tax_rate: {
code: "VAT",
name: "VAT",
rate: 20, // 20%
is_combinable: true,
},
})
.then(({ tax_region }) => {
console.log(tax_region)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"country_code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_tax_rate","type":"`object`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[AdminCreateTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateTaxRegion/page.mdx)","description":"The details of the tax region to create.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"country_code","type":"`string`","description":"The country code of the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`string`","description":"The province code of the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string`","description":"The ID of the parent tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"default_tax_rate","type":"`object`","description":"The default tax rate of the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"code","type":"`string`","description":"The code of the default tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"name","type":"`string`","description":"The name of the default tax rate.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"rate","type":"`number`","description":"The percentage rate of the default tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_combinable","type":"`boolean`","description":"Whether the default tax rate is combinable with other tax rates.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the default tax rate.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRegionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rates","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent","type":"`null` \\| [AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"children","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRegionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The tax region's details.","expandable":false,"children":[{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The tax region's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The tax region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The tax region's country code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The tax region's province or state code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`null` \\| `string`","description":"The ID of the parent tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the tax region was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the tax region was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the tax region was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user who created the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rates","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)[]","description":"The tax rates associated with the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent","type":"`null` \\| [AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The parent tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"children","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)[]","description":"The child tax regions.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## delete
This method deletes a tax region. It sends a request to the
[Delete Tax Region](https://docs.medusajs.com/api/admin#tax-regions\_deletetaxregionsid)
API route.
### Example
```ts
sdk.admin.taxRegion.delete("txreg_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the tax region to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRegionDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"tax_region\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRegionDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"tax_region\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
___
## retrieve
This method retrieves a tax region. It sends a request to the
[Get Tax Region](https://docs.medusajs.com/api/admin#tax-regions\_gettaxregionsid)
API route.
### Example
To retrieve a tax region by its ID:
```ts
sdk.admin.taxRegion.retrieve("txreg_123")
.then(({ tax_region }) => {
console.log(tax_region)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.taxRegion.retrieve("txreg_123", {
fields: "id,*tax_rates"
})
.then(({ tax_region }) => {
console.log(tax_region)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the tax region to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRegionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rates","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent","type":"`null` \\| [AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"children","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRegionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The tax region's details.","expandable":false,"children":[{"name":"tax_region","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The tax region's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The tax region's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`null` \\| `string`","description":"The tax region's country code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`null` \\| `string`","description":"The tax region's province or state code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`null` \\| `string`","description":"The ID of the parent tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the tax region was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the tax region was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the tax region was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user who created the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_rates","type":"[AdminTaxRate](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRate/page.mdx)[]","description":"The tax rates associated with the tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"parent","type":"`null` \\| [AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)","description":"The parent tax region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"children","type":"[AdminTaxRegion](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegion/page.mdx)[]","description":"The child tax regions.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## list
This method retrieves a list of tax regions. It sends a request to the
[List Tax Regions](https://docs.medusajs.com/api/admin#tax-regions\_gettaxregions)
API route.
### Example
To retrieve the list of tax regions:
```ts
sdk.admin.taxRegion.list()
.then(({ tax_regions, count, limit, offset }) => {
console.log(tax_regions)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.taxRegion.list({
limit: 10,
offset: 10
})
.then(({ tax_regions, count, limit, offset }) => {
console.log(tax_regions)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each tax region:
```ts
sdk.admin.taxRegion.list({
fields: "id,*tax_rates"
})
.then(({ tax_regions, count, limit, offset }) => {
console.log(tax_regions)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"$or","type":"([AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)&#62;)[]","description":"An array of filters tLine truncated
<TypeList types={[{"name":"query","type":"[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"([AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"and\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"([AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx) \\| [BaseFilterable](../../../../../types/DAL/interfaces/types.DAL.BaseFilterable/page.mdx)&#60;[AdminTaxRegionListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminTaxRegionListParams/page.mdx)&#62;)[]","description":"An array of filters to apply on the entity, where each item in the array is joined with an \"or\" condition.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by tax region ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the tax region's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"parent_id","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by the tax region's parent ID(s) to retrieve its children.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by the tax region's country code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province_code","type":"`string` \\| `string`[] \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string \\| string[]&#62;","description":"Filter by the tax region's province code(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the tax region was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the tax region was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the tax region was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`string` \\| [OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the ID of the user who created the tax region toLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRegionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminTaxRegionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminTaxRegionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminTaxRegionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of tax regions.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
@@ -15,34 +15,85 @@ This documentation provides a reference to the `sdk.admin.upload` set of methods
## create
This method creates a new upload. It sends a request to the
[Upload Files](https://docs.medusajs.com/api/admin#uploads\_postuploads)
API route.
### Example
```ts
sdk.admin.upload.create(
{
files: [
// file uploaded as a base64 string
{
name: "test.txt",
content: "test", // Should be the base64 content of the file
},
// file uploaded as a File object
new File(["test"], "test.txt", { type: "text/plain" })
],
}
)
.then(({ files }) => {
console.log(files)
})
```
### Parameters
<TypeList types={[{"name":"body","type":"[BaseUploadFile](../../../../../types/types/types.BaseUploadFile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"files","type":"(`object` \\| [File](../../../../../core_flows/core_flows.File/page.mdx))[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"body","type":"[BaseUploadFile](../../../../../types/types/types.BaseUploadFile/page.mdx)","description":"The details of the files to upload.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"files","type":"(`object` \\| [File](../../../../../core_flows/core_flows.File/page.mdx))[]","description":"The list of files to upload.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"name","type":"`string`","description":"The name of the file.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"content","type":"`string`","description":"The content of the file.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Configure the fields and relations to retrieve in the uploaded files.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"files","type":"[AdminFile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFile/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminFileListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFileListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The upload files' details.","expandable":false,"children":[{"name":"files","type":"[AdminFile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFile/page.mdx)[]","description":"The list of uploaded files.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the file in the configured File Module Provider.\nFor example, when using the Local File Provider Module (default provider),\nthe ID is the file's path relative to the `static` directory.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the file.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="create"/>
___
## retrieve
This method retrieves a file's details by its ID. It sends a request to the
[Get File](https://docs.medusajs.com/api/admin#uploads\_getuploadsid)
API route.
### Example
```ts
sdk.admin.upload.retrieve("test.txt")
.then(({ file }) => {
console.log(file)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the file to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"Query parameters to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;object&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"file","type":"[AdminFile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFile/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminFileResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFileResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The file's details.","expandable":false,"children":[{"name":"file","type":"[AdminFile](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFile/page.mdx)","description":"The file's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the file in the configured File Module Provider.\nFor example, when using the Local File Provider Module (default provider),\nthe ID is the file's path relative to the `static` directory.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"url","type":"`string`","description":"The URL of the file.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## delete
This method deletes a file by its ID from the configured File Module Provider. It sends a request to the
[Delete File](https://docs.medusajs.com/api/admin#uploads\_deleteuploadsid)
API route.
### Example
```ts
sdk.admin.upload.delete("test.txt")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the file to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminFileDeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminFileDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"TObject","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminFileDeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminFileDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"TObject","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
@@ -15,58 +15,186 @@ This documentation provides a reference to the `sdk.admin.user` set of methods u
## update
This method updates a user. It sends a request to the
[Update User](https://docs.medusajs.com/api/admin#users\_postusersid)
API route.
### Example
```ts
sdk.admin.user.update("user_123", {
first_name: "John",
last_name: "Doe",
})
.then(({ user }) => {
console.log(user)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateUser/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminUserParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the user to update.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateUser/page.mdx)","description":"The details of the user to update.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`null` \\| `string`","description":"The first name of the user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The last name of the user.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The URL of the user's avatar image.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the user.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminUserParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserParams/page.mdx)","description":"Configure the fields and relations to retrieve in the tax region.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The user's details.","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"The user's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The user's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The user's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The user's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The URL of the user's avatar image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the user was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the user was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the user was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="update"/>
___
## list
This method retrieves a list of users. It sends a request to the
[List Users](https://docs.medusajs.com/api/admin#users\_getusers)
API route.
### Example
To retrieve the list of users:
```ts
sdk.admin.user.list()
.then(({ users, count, limit, offset }) => {
console.log(users)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.user.list({
limit: 10,
offset: 10
})
.then(({ users, count, limit, offset }) => {
console.log(users)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each user:
```ts
sdk.admin.user.list({
fields: "id,email"
})
.then(({ users, count, limit, offset }) => {
console.log(users)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"queryParams","type":"[AdminUserListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserListParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contained","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$exists","type":"`boolean`","description":"","optional":true,"defaultValue":"",Line truncated
<TypeList types={[{"name":"queryParams","type":"[AdminUserListParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserListParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"q","type":"`string`","description":"Query or keywords to search the user's searchable fields.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string` \\| `string`[]","description":"Filter by user ID(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"Filter by email(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"Filter by first name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"Filter by last name(s).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"[OperatorMap](../../../../../types/DAL/types/types.DAL.OperatorMap/page.mdx)&#60;string&#62;","description":"Filter by the date the user was created.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62; \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)&#60;T&#62;","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)&#60;T&#62;","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$like","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$re","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ilike","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$fulltext","type":"`string`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$overlap","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$contains","type":"`string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"childrLine truncated
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"users","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of users.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"users","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)[]","description":"The list of users.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The user's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The user's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The user's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The URL of the user's avatar image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the user was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the user was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the user was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## retrieve
This method retrieves a user. It sends a request to the
[Get User](https://docs.medusajs.com/api/admin#users\_getusersid)
API route.
### Example
To retrieve a user by its ID:
```ts
sdk.admin.user.retrieve("user_123")
.then(({ user }) => {
console.log(user)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.user.retrieve("user_123", {
fields: "id,email"
})
.then(({ user }) => {
console.log(user)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminUserParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the user to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminUserParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserParams/page.mdx)","description":"Configure the fields and relations to retrieve in the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The user's details.","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"The user's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The user's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The user's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The user's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The URL of the user's avatar image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the user was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the user was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the user was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
___
## delete
This method deletes a user. It sends a request to the
[Delete User](https://docs.medusajs.com/api/admin#users\_deleteusersid)
API route.
### Example
```ts
sdk.admin.user.delete("user_123")
.then(({ deleted }) => {
console.log(deleted)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the user to delete.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"user\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserDeleteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The deletion's details.","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"object","type":"`\"user\"`","description":"The type of the item that was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted","type":"`boolean`","description":"Whether the item was deleted successfully.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="delete"/>
___
## me
This method retrieves the currently authenticated user. It sends a request to the
[Get Logged-In User](https://docs.medusajs.com/api/admin#users\_getusersme)
API route.
### Example
To retrieve the currently authenticated user:
```ts
sdk.admin.user.me()
.then(({ user }) => {
console.log(user)
})
```
To specify the fields and relations to retrieve:
```ts
sdk.admin.user.me({
fields: "id,email"
})
.then(({ user }) => {
console.log(user)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"query","type":"[AdminUserParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="me"/>
<TypeList types={[{"name":"query","type":"[AdminUserParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserParams/page.mdx)","description":"Configure the fields and relations to retrieve in the user.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="me"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="me"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminUserResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUserResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The user's details.","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"The user's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The user's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The user's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The user's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The URL of the user's avatar image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the user was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the user was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the user was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="me"/>
@@ -15,22 +15,78 @@ This documentation provides a reference to the `sdk.admin.workflowExecution` set
## list
This method retrieves a list of workflow executions. It sends a request to the
[List Workflow Executions](https://docs.medusajs.com/api/admin#workflows-executions\_getworkflowsexecutions)
API route.
### Example
To retrieve the list of workflow executions:
```ts
sdk.admin.workflowExecution.list()
.then(({ workflow_executions, count, limit, offset }) => {
console.log(workflow_executions)
})
```
To configure the pagination, pass the `limit` and `offset` query parameters.
For example, to retrieve only 10 items and skip 10 items:
```ts
sdk.admin.workflowExecution.list({
limit: 10,
offset: 10
})
.then(({ workflow_executions, count, limit, offset }) => {
console.log(workflow_executions)
})
```
Using the `fields` query parameter, you can specify the fields and relations to retrieve
in each workflow execution:
```ts
sdk.admin.workflowExecution.list({
fields: "id,name"
})
.then(({ workflow_executions, count, limit, offset }) => {
console.log(workflow_executions)
})
```
Learn more about the `fields` property in the [API reference](https://docs.medusajs.com/api/admin#select-fields-and-relations).
### Parameters
<TypeList types={[{"name":"queryParams","type":"[AdminGetWorkflowExecutionsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetWorkflowExecutionsParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transaction_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"workflow_id","type":"`string` \\| `string`[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"queryParams","type":"[AdminGetWorkflowExecutionsParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminGetWorkflowExecutionsParams/page.mdx)","description":"Filters and pagination configurations.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"limit","type":"`number`","description":"The maximum number of items to retrieve.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"order","type":"`string`","description":"The field to sort by and in which order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"transaction_id","type":"`string` \\| `string`[]","description":"Filter by the ID of the transaction to retrieve workflow executions for a specific transaction.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"workflow_id","type":"`string` \\| `string`[]","description":"Filter by the ID of the workflow to retrieve workflow executions for a specific workflow.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminWorkflowExecutionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminWorkflowExecutionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminWorkflowExecutionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminWorkflowExecutionListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of workflow executions.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="list"/>
___
## retrieve
This method retrieves a workflow execution by its ID. It sends a request to the
[Get Workflow Execution](https://docs.medusajs.com/api/admin#workflows-executions\_getworkflowsexecutionsworkflow\_idtransaction\_id)
API route.
### Example
```ts
sdk.admin.workflowExecution.retrieve("wrk_123")
.then(({ workflow_execution }) => {
console.log(workflow_execution)
})
```
### Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the workflow execution to retrieve.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
### Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminWorkflowExecutionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminWorkflowExecutionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"workflow_execution","type":"[AdminWorkflowExecution](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminWorkflowExecution/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"workflow_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transaction_id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"execution","type":"[AdminWorkflowExecutionExecution](../../../../../types/interfaces/types.AdminWorkflowExecutionExecution/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[WorkflowExecutionContext](../../../../../types/HttpTypes/interfaces/types.HttpTypes.WorkflowExecutionContext/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"state","type":"[TransactionState](../../../../../types/HttpTypes/types/types.HttpTypes.TransactionState/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminWorkflowExecutionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminWorkflowExecutionResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The workflow execution's details.","expandable":false,"children":[{"name":"workflow_execution","type":"[AdminWorkflowExecution](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminWorkflowExecution/page.mdx)","description":"The workflow execution's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the workflow execution.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"workflow_id","type":"`string`","description":"The ID of the workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"transaction_id","type":"`string`","description":"The ID of the transaction.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"execution","type":"[AdminWorkflowExecutionExecution](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminWorkflowExecutionExecution/page.mdx)","description":"The execution details of the workflow.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"context","type":"[WorkflowExecutionContext](../../../../../types/HttpTypes/interfaces/types.HttpTypes.WorkflowExecutionContext/page.mdx)","description":"The context of the workflow execution.\nThis includes the data, errors and the output of the step and compensation functions of the workflow execution.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"state","type":"[TransactionState](../../../../../types/HttpTypes/types/types.HttpTypes.TransactionState/page.mdx)","description":"The state of the workflow execution.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`Date`","description":"The date the workflow execution was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`Date`","description":"The date the workflow execution was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `Date`","description":"The date the workflow execution was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieve"/>
@@ -20,7 +20,7 @@ sdk.admin.apiKey.batchSalesChannels("apk_123", {
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The API key's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The sales channels to add or remove from the API key.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchSalesChannels"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The API key's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The sales channels to add or remove from the API key.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchSalesChannels"/>
## Returns
@@ -6,9 +6,21 @@ This method manages the promotions of a campaign to either add or remove the ass
It sends a request to the [Manage Promotions](https://docs.medusajs.com/api/admin#campaigns\_postcampaignsidpromotions)
API route.
## Example
```ts
sdk.admin.campaign.batchPromotions("procamp_123", {
add: ["prom_123", "prom_456"],
remove: ["prom_789"]
})
.then(({ campaign }) => {
console.log(campaign)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The campaign's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The promotions to add or remove associations to them.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPromotions"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The campaign's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payload","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The promotions to add or remove associations to them.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchPromotions"/>
## Returns
@@ -32,4 +32,4 @@ sdk.admin.claim.addInboundItems(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":falseLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":falseLine truncated
@@ -29,4 +29,4 @@ sdk.admin.claim.addInboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
@@ -27,4 +27,4 @@ sdk.admin.claim.addItems("claim_123", {
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
@@ -29,4 +29,4 @@ sdk.admin.claim.addOutboundItems(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
@@ -30,4 +30,4 @@ API route.
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
@@ -23,4 +23,4 @@ sdk.admin.claim.create({
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim and order's details.","expandable":false,"children":[{"name":"order","type":"[OrderDTO](../../../../../fulfillment/interfaces/fulfillment.OrderDTO/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The version of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx)","description":"The status of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The subtotal of the order. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The discount subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The discount total of the order.","optional":false,"defaultValue":"","expandable":false,"childrLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim and order's details.","expandable":false,"children":[{"name":"order","type":"[OrderDTO](../../../../../fulfillment/interfaces/fulfillment.OrderDTO/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The ID of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The version of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"display_id","type":"`number`","description":"The order's display ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"[OrderStatus](../../../../../fulfillment/types/fulfillment.OrderStatus/page.mdx)","description":"The status of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The currency of the order","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"When the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"When the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original item tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The item tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The original tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The subtotal of the order. (Excluding taxes)","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"tax_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The tax total of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_subtotal","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The discount subtotal of the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"discount_total","type":"[BigNumberValue](../../../../../fulfillment/types/fulfillment.BigNumberValue/page.mdx)","description":"The discount total of the order.","optional":false,"defaultValue":"","expandable":false,"childrLine truncated
@@ -27,4 +27,4 @@ sdk.admin.claim.deleteInboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
@@ -25,4 +25,4 @@ sdk.admin.claim.deleteOutboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
@@ -27,4 +27,4 @@ sdk.admin.claim.removeInboundItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
@@ -27,4 +27,4 @@ sdk.admin.claim.removeItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
@@ -27,4 +27,4 @@ sdk.admin.claim.removeOutboundItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
@@ -24,4 +24,4 @@ sdk.admin.claim.request(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimRequestResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimRequestResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim and its associated return, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimRequestResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimRequestResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim and its associated return, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[Line truncated
@@ -30,4 +30,4 @@ sdk.admin.claim.updateInboundItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimReturnPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimReturnPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated wth the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,Line truncated
@@ -30,4 +30,4 @@ sdk.admin.claim.updateInboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
@@ -29,4 +29,4 @@ sdk.admin.claim.updateItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The claim's details with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","typeLine truncated
@@ -30,4 +30,4 @@ sdk.admin.claim.updateOutboundItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
@@ -30,4 +30,4 @@ sdk.admin.claim.updateOutboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminClaimPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminClaimPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the claim, with a preview of the order when the claim is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"Preview of the order when the claim is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal"Line truncated
@@ -20,7 +20,7 @@ sdk.admin.customer.batchCustomerGroups("cus_123", {
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The groups to add customer to or remove customer from.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomerGroups"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The groups to add customer to or remove customer from.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomerGroups"/>
## Returns
@@ -0,0 +1,29 @@
import { TypeList } from "docs-ui"
# createAddress
This method creates a customer address. It sends a request to the
[Create Customer Address](https://docs.medusajs.com/api/admin#customers\_postcustomersidaddresses)
API route.
## Example
```ts
sdk.admin.customer.createAddress("cus_123", {
address_1: "123 Main St",
city: "Anytown",
country_code: "US",
postal_code: "12345"
})
.then(({ customer }) => {
console.log(customer)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminCreateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateCustomerAddress/page.mdx)","description":"The customer address's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createAddress"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customer address's details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createAddress"/>
@@ -2,7 +2,7 @@ import { TypeList } from "docs-ui"
# delete
This method deletes a customer by its ID. It sends a request to the
This method deletes a customer by its ID. It sends a request to the
[Delete Customer](https://docs.medusajs.com/api/admin#customers\_deletecustomersid)
API route.
@@ -0,0 +1,24 @@
import { TypeList } from "docs-ui"
# deleteAddress
This method deletes a customer address. It sends a request to the
[Delete Customer Address](https://docs.medusajs.com/api/admin#customers\_deletecustomersidaddressesaddressid)
API route.
## Example
```ts
sdk.admin.customer.deleteAddress("cus_123", "cus_addr_123")
.then(({ customer }) => {
console.log(customer)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"The customer address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteAddress"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customer address's details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="deleteAddress"/>
@@ -0,0 +1,24 @@
import { TypeList } from "docs-ui"
# listAddresses
This method retrieves a list of customer addresses. It sends a request to the
[List Customer Addresses](https://docs.medusajs.com/api/admin#customers\_getcustomersidaddresses)
API route.
## Example
```ts
sdk.admin.customer.listAddresses("cus_123")
.then(({ addresses }) => {
console.log(addresses)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAddresses"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of customer addresses.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listAddresses"/>
@@ -2,7 +2,7 @@ import { TypeList } from "docs-ui"
# retrieve
This method retrieves a customer by its ID. It sends a request to the
This method retrieves a customer by its ID. It sends a request to the
[Get Customer](https://docs.medusajs.com/api/admin#customers\_getcustomersid)
API route.
@@ -0,0 +1,24 @@
import { TypeList } from "docs-ui"
# retrieveAddress
This method retrieves a customer address by its ID. It sends a request to the
[Get Customer Address](https://docs.medusajs.com/api/admin#customers\_getcustomersidaddressesaddressid)
API route.
## Example
```ts
sdk.admin.customer.retrieveAddress("cus_123", "cus_addr_123")
.then(({ customer }) => {
console.log(customer)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"The customer address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveAddress"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customer address's details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="retrieveAddress"/>
@@ -0,0 +1,29 @@
import { TypeList } from "docs-ui"
# updateAddress
This method updates a customer address. It sends a request to the
[Update Customer Address](https://docs.medusajs.com/api/admin#customers\_postcustomersidaddressesaddressid)
API route.
## Example
```ts
sdk.admin.customer.updateAddress("cus_123", "cus_addr_123", {
address_1: "123 Main St",
city: "Anytown",
country_code: "US",
postal_code: "12345"
})
.then(({ customer }) => {
console.log(customer)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addressId","type":"`string`","description":"The customer address's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateCustomerAddress/page.mdx)","description":"The customer address's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The address's first name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The address's last name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The address's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The address's company.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The address's first line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The address's second line.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The address's city.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The address's country code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The address's province.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The address's postal code.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_name","type":"`string`","description":"The address's name.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_shipping","type":"`boolean`","description":"Whether the address is used by default for shipping.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"is_default_billing","type":"`boolean`","description":"Whether the address is used by default for billing.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateAddress"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminCustomerResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The customer address's details.","expandable":false,"children":[{"name":"customer","type":"[AdminCustomer](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomer/page.mdx)","description":"The customer's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"has_account","type":"`boolean`","description":"Whether the customer is a guest.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"addresses","type":"[AdminCustomerAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerAddress/page.mdx)[]","description":"The customer's addresses.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The customer's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The customer's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_billing_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default billing address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"default_shipping_address_id","type":"`null` \\| `string`","description":"The ID of the customer's default shipping address.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"company_name","type":"`null` \\| `string`","description":"The customer's company name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The customer's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The customer's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"groups","type":"[AdminCustomerGroup](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCustomerGroup/page.mdx)[]","description":"The groups the customer is in.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`null` \\| `string`","description":"The customer's phone.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Key-value pairs of custom data.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_by","type":"`null` \\| `string`","description":"The ID of the user that created the customer.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string` \\| `Date`","description":"The date the customer was deleted.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the customer was created.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the customer was updated.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateAddress"/>
@@ -20,7 +20,7 @@ sdk.admin.customerGroup.batchCustomers("cusgroup_123", {
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The group's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The customers to add or remove from the group.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The items to remove association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomers"/>
<TypeList types={[{"name":"id","type":"`string`","description":"The group's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminBatchLink](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminBatchLink/page.mdx)","description":"The customers to add or remove from the group.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"add","type":"`string`[]","description":"The IDs of the items to create an association to.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"remove","type":"`string`[]","description":"The IDs of the items to remove the association from.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="batchCustomers"/>
## Returns
@@ -0,0 +1,32 @@
import { TypeList } from "docs-ui"
# addItems
This method adds items to a draft order. It sends a request to the
[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditems) API route.
## Example
To add items to a draft order:
```ts
sdk.admin.draftOrder.addItems("order_123", {
items: [
{
variant_id: "variant_123",
quantity: 1,
},
],
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddDraftOrderItems](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddDraftOrderItems/page.mdx)","description":"The data to add the items to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"items","type":"[AdminAddDraftOrderItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddDraftOrderItem/page.mdx)[]","description":"The items to add to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"variant_id","type":"`string`","description":"The item's variant ID.\n\nEither variant\\_id or title must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"title","type":"`string`","description":"The item's title.\n\nEither variant\\_id or title must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`null` \\| `number`","description":"The item's unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"`null` \\| `number`","description":"The item's compare at unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"The item's internal note.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The item's metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]}]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addItems"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method adds items to a draft order. It sends a request to the\n[Add Draft Order Items](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsiditems) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items inclLine truncated
@@ -0,0 +1,27 @@
import { TypeList } from "docs-ui"
# addPromotions
This method adds promotions to a draft order. It sends a request to the
[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidpromotions) API route.
## Example
To add promotions to a draft order:
```ts
sdk.admin.draftOrder.addPromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddDraftOrderPromotions](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddDraftOrderPromotions/page.mdx)","description":"The data to add the promotions to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"promo_codes","type":"`string`[]","description":"The promotion codes to apply to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addPromotions"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method adds promotions to a draft order. It sends a request to the\n[Add Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidpromotions) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the ordLine truncated
@@ -0,0 +1,27 @@
import { TypeList } from "docs-ui"
# addShippingMethod
This method adds a shipping method to a draft order. It sends a request to the
[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methods) API route.
## Example
To add a shipping method to a draft order:
```ts
sdk.admin.draftOrder.addShippingMethod("order_123", {
shipping_option_id: "shipping_option_123",
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminAddDraftOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminAddDraftOrderShippingMethod/page.mdx)","description":"The data to add the shipping method to the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`string`","description":"Description of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`string`","description":"Internal note for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`Record<string, unknown>`","description":"Metadata for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="addShippingMethod"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method adds a shipping method to a draft order. It sends a request to the\n[Add Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidshipping-methods) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"ThLine truncated
@@ -0,0 +1,25 @@
import { TypeList } from "docs-ui"
# beginEdit
This method begins an edit to a draft order. It sends a request to the
[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsid) API route.
## Example
To begin an edit to a draft order:
```ts
sdk.admin.draftOrder.beginEdit("order_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="beginEdit"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method begins an edit to a draft order. It sends a request to the\n[Begin Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsid) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items inclLine truncated
@@ -0,0 +1,25 @@
import { TypeList } from "docs-ui"
# cancelEdit
This method cancels an edit to a draft order. It sends a request to the
[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsid) API route.
## Example
To cancel an edit to a draft order:
```ts
sdk.admin.draftOrder.cancelEdit("order_123")
.then(({ id, object, deleted }) => {
console.log(id, object, deleted)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelEdit"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[DeleteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.DeleteResponse/page.mdx)&#60;\"draft-order-edit\"&#62;&#62;","optional":false,"defaultValue":"","description":"This method cancels an edit to a draft order. It sends a request to the\n[Cancel Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\\_deleteordereditsid) API route.","expandable":false,"children":[{"name":"\"draft-order-edit\"","type":"`\"draft-order-edit\"`","optional":false,"defaultValue":"","description":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="cancelEdit"/>
@@ -0,0 +1,25 @@
import { TypeList } from "docs-ui"
# confirmEdit
This method confirms an edit to a draft order. It sends a request to the
[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidconfirm) API route.
## Example
To confirm an edit to a draft order:
```ts
sdk.admin.draftOrder.confirmEdit("order_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="confirmEdit"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method confirms an edit to a draft order. It sends a request to the\n[Confirm Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidconfirm) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order'sLine truncated
@@ -0,0 +1,24 @@
import { TypeList } from "docs-ui"
# convertToOrder
This method converts a draft order to an order. It sends a request to the
[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders\_postdraftordersidconvert-to-order) API route.
## Example
To convert a draft order to an order:
```ts
sdk.admin.draftOrder.convertToOrder("order_123")
.then(({ order }) => {
console.log(order)
})
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"query","type":"[AdminDraftOrderParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderParams/page.mdx)","description":"Configure the fields to retrieve in the order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="convertToOrder"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method converts a draft order to an order. It sends a request to the\n[Convert Draft Order to Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftordersidconvert-to-order) API route.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","descriLine truncated
@@ -19,7 +19,7 @@ sdk.admin.draftOrder.create({
},
],
region_id: "region_123",
sales_channel_id: "sales_channel_123",
sales_channel_id: "sc_123",
})
.then(({ draft_order }) => {
console.log(draft_order)
@@ -28,8 +28,8 @@ sdk.admin.draftOrder.create({
## Parameters
<TypeList types={[{"name":"body","type":"[AdminCreateDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateDraftOrder/page.mdx)","description":"The data to create the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"region_id","type":"`string`","description":"The ID of the region to associate the draft order with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The draft order's email.\n\nEither email or customer\\_id must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer to associate the draft order with.\n\nEither customer\\_id or email must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code to use for the draft order.\n\nIf not provided, the currency from the region will be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promo_codes","type":"`string`[]","description":"The promotions to apply to the draft order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","descrLine truncated
<TypeList types={[{"name":"body","type":"[AdminCreateDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminCreateDraftOrder/page.mdx)","description":"The data to create the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel to associate the draft order with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`string`","description":"The ID of the region to associate the draft order with.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The draft order's email.\n\nEither email or customer\\_id must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer to associate the draft order with.\n\nEither customer\\_id or email must be provided.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`null` \\| `string`","description":"The currency code to use for the draft order.\n\nIf not provided, the currency from the region will be used.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"promo_codes","type":"`string`[]","description":"The promotions to apply to the draft order.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"`string` \\| [OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"`string` \\| [OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"Line truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method creates a draft order. It sends a request to the\n[Create Draft Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftorders) API route.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order inclLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method creates a draft order. It sends a request to the\n[Create Draft Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftorders) API route.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"The details of the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","descriptioLine truncated
@@ -50,4 +50,4 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of draft orders.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_orders","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The paginated list of draft orders.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"draft_orders","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)[]","description":"The list of draft orders.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the orLine truncated
@@ -0,0 +1,25 @@
import { TypeList } from "docs-ui"
# removeActionItem
This method removes an item that is part of an action in a draft order. It sends a request to the
[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsiditemsaction\_id) API route.
## Example
To remove an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.removeActionItem("order_123", "action_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The action ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionItem"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method removes an item that is part of an action in a draft order. It sends a request to the\n[Remove Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\\_deleteordereditsiditemsaction\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","desLine truncated
@@ -0,0 +1,25 @@
import { TypeList } from "docs-ui"
# removeActionShippingMethod
This method removes a shipping method from a draft order. It sends a request to the
[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsidshipping-methodsaction\_id) API route.
## Example
To remove a shipping method from a draft order:
```ts
sdk.admin.draftOrder.removeShippingMethod("order_123", "action_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The action ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removeActionShippingMethod"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method removes a shipping method from a draft order. It sends a request to the\n[Remove Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\\_deleteordereditsidshipping-methodsaction\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`numbeLine truncated
@@ -0,0 +1,24 @@
import { TypeList } from "docs-ui"
# removePromotions
This method removes promotions from a draft order. It sends a request to the
[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\_deleteordereditsidpromotions) API route.
## Example
To remove promotions from a draft order:
```ts
sdk.admin.draftOrder.removePromotions("order_123", {
promo_codes: ["PROMO_CODE_1", "PROMO_CODE_2"],
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminRemoveDraftOrderPromotions](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminRemoveDraftOrderPromotions/page.mdx)","description":"The data to remove the promotions from the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"promo_codes","type":"`string`[]","description":"The promotion codes to remove from the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="removePromotions"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method removes promotions from a draft order. It sends a request to the\n[Remove Draft Order Promotions](https://docs.medusajs.com/api/admin#draft-orders\\_deleteordereditsidpromotions) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total Line truncated
@@ -0,0 +1,25 @@
import { TypeList } from "docs-ui"
# requestEdit
This method requests an edit to a draft order. It sends a request to the
[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidrequest) API route.
## Example
To request an edit to a draft order:
```ts
sdk.admin.draftOrder.requestEdit("order_123")
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="requestEdit"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method requests an edit to a draft order. It sends a request to the\n[Request Draft Order Edit](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidrequest) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order'sLine truncated
@@ -11,7 +11,7 @@ API route.
To retrieve a draft order by its ID:
```ts
sdk.admin.draftOrder.retrieve("draft_order_123")
sdk.admin.draftOrder.retrieve("order_123")
.then(({ draft_order }) => {
console.log(draft_order)
})
@@ -20,7 +20,7 @@ sdk.admin.draftOrder.retrieve("draft_order_123")
To specify the fields and relations to retrieve:
```ts
sdk.admin.draftOrder.retrieve("draft_order_123", {
sdk.admin.draftOrder.retrieve("order_123", {
fields: "id,*items"
})
.then(({ draft_order }) => {
@@ -36,4 +36,4 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The draft order's details.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","tLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The draft order's details.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"The details of the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]}Line truncated
@@ -10,7 +10,7 @@ This method updates a draft order. It sends a request to the
To update a draft order:
```ts
sdk.admin.draftOrder.update("draft_order_123", {
sdk.admin.draftOrder.update("order_123", {
email: "test@test.com",
})
.then(({ draft_order }) => {
@@ -20,8 +20,8 @@ sdk.admin.draftOrder.update("draft_order_123", {
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrder/page.mdx)","description":"The data to update the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The draft order's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The draft order's metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[AdminDraftOrderParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderParams/page.mdx)","description":"Configure the fields to retrieve in the draft order.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","deLine truncated
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrder/page.mdx)","description":"The data to update the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"email","type":"`string`","description":"The draft order's email.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`string`","description":"The ID of the customer to associate the draft order with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`string`","description":"The ID of the sales channel to associate the draft order with.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_address","type":"[OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's shipping address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"billing_address","type":"[OrderAddress](../../../../../types/HttpTypes/interfaces/types.HttpTypes.OrderAddress/page.mdx)","description":"The draft order's billing address.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"first_name","type":"`string`","description":"The first name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`string`","description":"The last name of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"phone","type":"`string`","description":"The phone number of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"company","type":"`string`","description":"The company of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_1","type":"`string`","description":"The first address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"address_2","type":"`string`","description":"The second address line of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"city","type":"`string`","description":"The city of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"country_code","type":"`string`","description":"The country code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"province","type":"`string`","description":"The province/state of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"postal_code","type":"`string`","description":"The postal code of the address.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Holds custom data in key-value pairs.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The draft order's metadata.","optionLine truncated
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates a draft order. It sends a request to the\n[Update Draft Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftordersid) API route.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order inLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates a draft order. It sends a request to the\n[Update Draft Order](https://docs.medusajs.com/api/admin#draft-orders\\_postdraftordersid) API route.","expandable":false,"children":[{"name":"draft_order","type":"[AdminDraftOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrder/page.mdx)","description":"The details of the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","descriptLine truncated
@@ -0,0 +1,27 @@
import { TypeList } from "docs-ui"
# updateActionItem
This method updates an item that is part of an action in a draft order. It sends a request to the
[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditemsaction\_id) API route.
## Example
To update an item that is part of an action in a draft order:
```ts
sdk.admin.draftOrder.updateActionItem("order_123", "action_123", {
quantity: 2,
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The action ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderItem/page.mdx)","description":"The data to update the item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`null` \\| `number`","description":"The item's unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"`null` \\| `number`","description":"The item's compare at unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"The item's internal note.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The item's metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionItem"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates an item that is part of an action in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsiditemsaction\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","descrLine truncated
@@ -0,0 +1,27 @@
import { TypeList } from "docs-ui"
# updateActionShippingMethod
This method updates a shipping method in a draft order. It sends a request to the
[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsidshipping-methodsaction\_id) API route.
## Example
To update a shipping method in a draft order:
```ts
sdk.admin.draftOrder.updateShippingMethod("order_123", "action_123", {
shipping_option_id: "shipping_option_123",
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"actionId","type":"`string`","description":"The action ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderActionShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderActionShippingMethod/page.mdx)","description":"The data to update the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`null` \\| `number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"description","type":"`null` \\| `string`","description":"Description of the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"Internal note for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Metadata for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateActionShippingMethod"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates a shipping method in a draft order. It sends a request to the\n[Update Draft Order Shipping Method](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsidshipping-methodsaction\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`",Line truncated
@@ -0,0 +1,27 @@
import { TypeList } from "docs-ui"
# updateItem
This method updates an item in a draft order. It sends a request to the
[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\_postordereditsiditemsitem\_id) API route.
## Example
To update an item in a draft order:
```ts
sdk.admin.draftOrder.updateItem("order_123", "item_123", {
quantity: 2,
})
.then(({ draft_order_preview }) => {
console.log(draft_order_preview)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The draft order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"itemId","type":"`string`","description":"The item ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderItem/page.mdx)","description":"The data to update the item.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"quantity","type":"`number`","description":"The item's quantity.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"unit_price","type":"`null` \\| `number`","description":"The item's unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"compare_at_unit_price","type":"`null` \\| `number`","description":"The item's compare at unit price.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"The item's internal note.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The item's metadata.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateItem"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"This method updates an item in a draft order. It sends a request to the\n[Update Draft Order Item](https://docs.medusajs.com/api/admin#draft-orders\\_postordereditsiditemsitem\\_id) API route.","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the orLine truncated
@@ -0,0 +1,11 @@
import { TypeList } from "docs-ui"
# updateShippingMethod
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"methodId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"[AdminUpdateDraftOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUpdateDraftOrderShippingMethod/page.mdx)","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"shipping_option_id","type":"`string`","description":"ID of the shipping option to associate with the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"custom_amount","type":"`number`","description":"Custom amount for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"internal_note","type":"`null` \\| `string`","description":"Internal note for the shipping method.","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="updateShippingMethod"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminDraftOrderPreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"draft_order_preview","type":"[AdminDraftOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminDraftOrderPreview/page.mdx)","description":"The details of the preview on the draft order.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the ordeLine truncated
@@ -28,4 +28,4 @@ sdk.admin.exchange.addInboundItems("exchange_123", {
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
@@ -28,4 +28,4 @@ sdk.admin.exchange.addInboundShipping("exchange_123", {
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
@@ -28,4 +28,4 @@ sdk.admin.exchange.addOutboundItems("exchange_123", {
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
@@ -25,4 +25,4 @@ sdk.admin.exchange.addOutboundShipping("exchange_123", {
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
@@ -29,4 +29,4 @@ sdk.admin.exchange.deleteInboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
@@ -29,4 +29,4 @@ sdk.admin.exchange.deleteOutboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
@@ -29,4 +29,4 @@ sdk.admin.exchange.removeInboundItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
@@ -29,4 +29,4 @@ sdk.admin.exchange.removeOutboundItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
@@ -22,4 +22,4 @@ sdk.admin.exchange.request("exchange_123", {})
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeRequestResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeRequestResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange and associated return's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"chLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeRequestResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeRequestResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange and associated return's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"chLine truncated
@@ -32,4 +32,4 @@ sdk.admin.exchange.updateInboundItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
@@ -32,4 +32,4 @@ sdk.admin.exchange.updateInboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangeReturnResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangeReturnResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The details of the return associated with the exchange, with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"A preview of the order when the exchange is confirmed.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":Line truncated
@@ -32,4 +32,4 @@ sdk.admin.exchange.updateOutboundItem(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
@@ -32,4 +32,4 @@ sdk.admin.exchange.updateOutboundShipping(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminExchangePreviewResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminExchangePreviewResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The exchange's details with a preview of the order when the exchange is applied.","expandable":false,"children":[{"name":"order_preview","type":"[AdminOrderPreview](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderPreview/page.mdx)","description":"The preview of the order when the exchange is applied.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"return_requested_total","type":"`number`","description":"The total amount for the items requested to be returned.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"order_change","type":"[AdminOrderChange](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderChange/page.mdx)","description":"The details of the changes on the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx) & `object`[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx) & `object`[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"iLine truncated
@@ -3,13 +3,22 @@ import { TypeList } from "docs-ui"
# listFulfillmentOptions
This method retrieves a list of fulfillment options for a given fulfillment provider. It sends a request to the
[List Fulfillment Options](https://docs.medusajs.com/api/admin#fulfillment-providers\_getfulfillmentprovideroptions)
[List Fulfillment Options](https://docs.medusajs.com/api/admin#fulfillment-providers\_getfulfillmentprovidersidoptions)
API route.
## Example
```ts
sdk.admin.fulfillmentProvider.listFulfillmentOptions("fp_123")
.then(({ fulfillment_options }) => {
console.log(fulfillment_options)
})
```
## Parameters
<TypeList types={[{"name":"id","type":"`string`","description":"The ID of the fulfillment provider.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"Headers to pass in the request.","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listFulfillmentOptions"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminFulfillmentProviderOptionsListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProviderOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of fulfillment options.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_options","type":"[AdminFulfillmentProviderOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProviderOption/page.mdx)[]","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment provider option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether the fulfillment provider option can be used for returns.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listFulfillmentOptions"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminFulfillmentProviderOptionsListResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProviderOptionsListResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The list of fulfillment options.","expandable":false,"children":[{"name":"limit","type":"`number`","description":"The maximum number of items retrieved.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"offset","type":"`number`","description":"The number of items to skip before retrieving the returned items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"count","type":"`number`","description":"The total number of items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_options","type":"[AdminFulfillmentProviderOption](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminFulfillmentProviderOption/page.mdx)[]","description":"The list of fulfillment options.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The fulfillment provider option's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"is_return","type":"`boolean`","description":"Whether the fulfillment provider option can be used for returns.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="listFulfillmentOptions"/>
@@ -39,4 +39,4 @@ sdk.admin.invite.accept(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminAcceptInviteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminAcceptInviteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The user's details.","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"The user's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"message","type":"`string`","description":"A message if an error occurs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="accept"/>
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminAcceptInviteResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminAcceptInviteResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The user's details.","expandable":false,"children":[{"name":"user","type":"[AdminUser](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminUser/page.mdx)","description":"The user's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"id","type":"`string`","description":"The user's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`string`","description":"The user's email.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"first_name","type":"`null` \\| `string`","description":"The user's first name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"last_name","type":"`null` \\| `string`","description":"The user's last name.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"avatar_url","type":"`null` \\| `string`","description":"The URL of the user's avatar image.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"Custom key-value pairs that can be added to the user.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string`","description":"The date the user was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string`","description":"The date the user was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"deleted_at","type":"`null` \\| `string`","description":"The date the user was deleted.","optional":false,"defaultValue":"","expandable":false,"children":[]}]},{"name":"message","type":"`string`","description":"A message if an error occurs.","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="accept"/>
@@ -21,4 +21,4 @@ sdk.admin.order.cancel("order_123")
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
@@ -27,4 +27,4 @@ sdk.admin.order.cancelFulfillment(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
@@ -21,4 +21,4 @@ sdk.admin.order.cancelTransfer("order_123")
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
@@ -0,0 +1,11 @@
import { TypeList } from "docs-ui"
# createCreditLine
## Parameters
<TypeList types={[{"name":"orderId","type":"`string`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"body","type":"Omit&#60;[CreateOrderCreditLineDTO](../../../../../order/interfaces/order.CreateOrderCreditLineDTO/page.mdx), \"order_id\"&#62;","description":"","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"amount","type":"[BigNumberInput](../../../../../order/types/order.BigNumberInput/page.mdx)","description":"The amount of the credit line.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"value","type":"`string` \\| `number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"numeric","type":"`number`","description":"","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"raw","type":"[BigNumberRawValue](../../../../../order/types/order.BigNumberRawValue/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"bigNumber","type":"`BigNumber`","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"reference","type":"`null` \\| `string`","description":"The reference model name that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"reference_id","type":"`null` \\| `string`","description":"The reference model id that the credit line is generated from","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"metadata","type":"`null` \\| `Record<string, unknown>`","description":"The metadata of the order detail","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"query","type":"[SelectParams](../../../../../types/HttpTypes/interfaces/types.HttpTypes.SelectParams/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"fields","type":"`string`","description":"The fields and relations to retrieve separated by commas.\n\nLearn more in the [API reference](https://docs.medusajs.com/api/store#select-fields-and-relations).","optional":true,"defaultValue":"","expandable":false,"children":[]}]},{"name":"headers","type":"[ClientHeaders](../../../types/js_sdk.admin.ClientHeaders/page.mdx)","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"tags","type":"`string`[]","description":"Tags to cache data under for Next.js applications.\n\nLearn more in [Next.js's documentation](https://nextjs.org/docs/app/building-your-application/caching#fetch-optionsnexttags-and-revalidatetag).","optional":false,"defaultValue":"","expandable":false,"children":[]}]}]} expandUrl="https://docs.medusajs.com/learn/fundamentals/data-models/manage-relationships#retrieve-records-of-relation" sectionTitle="createCreditLine"/>
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`number`","description":"TLine truncated
@@ -28,4 +28,4 @@ sdk.admin.order.createFulfillment("order_123", {
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
@@ -32,4 +32,4 @@ sdk.admin.order.createShipment(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
@@ -24,4 +24,4 @@ sdk.admin.order.markAsDelivered(
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
@@ -24,4 +24,4 @@ sdk.admin.order.requestTransfer("order_123", {
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
@@ -36,4 +36,4 @@ Learn more about the `fields` property in the [API reference](https://docs.medus
## Returns
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
<TypeList types={[{"name":"Promise","type":"Promise&#60;[AdminOrderResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderResponse/page.mdx)&#62;","optional":false,"defaultValue":"","description":"The order's details.","expandable":false,"children":[{"name":"order","type":"[AdminOrder](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrder/page.mdx)","description":"The order's details.","optional":false,"defaultValue":"","expandable":false,"children":[{"name":"payment_collections","type":"[AdminPaymentCollection](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminPaymentCollection/page.mdx)[]","description":"The order's payment collections.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"items","type":"[AdminOrderLineItem](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderLineItem/page.mdx)[]","description":"The order's items.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"shipping_methods","type":"[AdminOrderShippingMethod](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminOrderShippingMethod/page.mdx)[]","description":"The order's shipping methods.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"id","type":"`string`","description":"The order's ID.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"version","type":"`number`","description":"The order's version.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"region_id","type":"`null` \\| `string`","description":"The ID of the associated region.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"customer_id","type":"`null` \\| `string`","description":"The ID of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"sales_channel_id","type":"`null` \\| `string`","description":"The ID of the sales channel the order was placed in.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"email","type":"`null` \\| `string`","description":"The email of the customer that placed the order.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"currency_code","type":"`string`","description":"The order's currency code.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"status","type":"`string`","description":"The order's status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"payment_status","type":"[PaymentStatus](../../../../../types/types/types.PaymentStatus/page.mdx)","description":"The order's payment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"fulfillment_status","type":"[FulfillmentStatus](../../../../../types/types/types.FulfillmentStatus/page.mdx)","description":"The order's fulfillment status.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"summary","type":"[BaseOrderSummary](../../../../../types/interfaces/types.BaseOrderSummary/page.mdx)","description":"The order's summary.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"created_at","type":"`string` \\| `Date`","description":"The date the order was created.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"updated_at","type":"`string` \\| `Date`","description":"The date the order was updated.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_total","type":"`number`","description":"The total of the order's items including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_item_tax_total","type":"`number`","description":"The tax total applied on the order's items, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_total","type":"`number`","description":"The total of the order's items including taxes and promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_subtotal","type":"`number`","description":"The total of the order's items excluding taxes, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"item_tax_total","type":"`number`","description":"The tax total applied on the order's items, including promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_total","type":"`number`","description":"The total of the order including taxes, excluding promotions.","optional":false,"defaultValue":"","expandable":false,"children":[]},{"name":"original_subtotal","type":"`numbeLine truncated
Loaded 100 of 1790 files, more files were not shown because too many files have changed in this diff. Show more