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:
1790 files changed
+220057
-187216
No files matched your search
+18
-2
@@ -2,10 +2,26 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# 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<[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)>","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<[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)>","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
|
||||
+15
-2
@@ -2,10 +2,23 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# 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<[AdminShippingOptionDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionDeleteResponse/page.mdx)>","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<[AdminShippingOptionDeleteResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionDeleteResponse/page.mdx)>","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"/>
|
||||
+45
-2
@@ -2,10 +2,53 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# 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)<string>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[{"name":"$and","type":"[Query](../../../../../types/types/types.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)<T>","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>","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)<string>","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)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$or","type":"[Query](../../../../../types/types/types.Query/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$eq","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T> \\| [ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$ne","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$in","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$nin","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>[]","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$not","type":"[Query](../../../../../types/types/types.Query/page.mdx)<T>","description":"API wrapper around the remoteQuery","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gt","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$gte","type":"[ExpandScalar](../../../../../types/types/types.ExpandScalar/page.mdx)<T>","description":"","optional":true,"defaultValue":"","expandable":false,"children":[]},{"name":"$lt"Line truncated
|
||||
|
||||
## Returns
|
||||
|
||||
<TypeList types={[{"name":"Promise","type":"Promise<[AdminShippingOptionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminShippingOptionListResponse/page.mdx)>","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<[AdminShippingOptionListResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminShippingOptionListResponse/page.mdx)>","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"/>
|
||||
+30
-2
@@ -2,10 +2,38 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# 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<[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)>","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<[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)>","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
|
||||
+17
-2
@@ -2,10 +2,25 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# 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<[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)>","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<[AdminShippingOptionResponse](../../../../../types/HttpTypes/interfaces/types.HttpTypes.AdminShippingOptionResponse/page.mdx)>","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
|
||||
+17
-2
@@ -2,10 +2,25 @@ import { TypeList } from "docs-ui"
|
||||
|
||||
# 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<[AdminUpdateShippingOptionRulesResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminUpdateShippingOptionRulesResponse/page.mdx)>","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<[AdminUpdateShippingOptionRulesResponse](../../../../../types/HttpTypes/types/types.HttpTypes.AdminUpdateShippingOptionRulesResponse/page.mdx)>","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"/>
|
||||
Reference in new issue
Block a user