Files
medusa-store/www/apps/api-reference/specs/admin/components/schemas/AdminCreateShippingOption.yaml
github-actions[bot] 8209d936a0 chore(docs): Updated API Reference (v2) (#9666)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action

Co-authored-by: Oli Juhl <59018053+olivermrbl@users.noreply.github.com>
Co-authored-by: Shahed Nasser <27354907+shahednasser@users.noreply.github.com>
2024-10-18 17:14:26 +00:00

89 lines
2.5 KiB
YAML

type: object
description: The shipping option's details.
x-schemaName: AdminCreateShippingOption
required:
- name
- service_zone_id
- shipping_profile_id
- price_type
- provider_id
- type
- prices
properties:
name:
type: string
title: name
description: The shipping option's name.
service_zone_id:
type: string
title: service_zone_id
description: The ID of the associated service zone.
shipping_profile_id:
type: string
title: shipping_profile_id
description: The ID of the associated shipping profile.
data:
type: object
description: >-
The shipping option's data, useful for the fulfillment provider handling
its processing.
externalDocs:
url: >-
https://docs.medusajs.com/v2/resources/commerce-modules/fulfillment/shipping-option#data-property
price_type:
type: string
description: >-
The shipping option's price type. If `flat`, the shipping option has a
fixed price set in `prices`. Otherwise, the shipping option's price is
calculated by the fulfillment provider.
enum:
- flat
- calculated
provider_id:
type: string
title: provider_id
description: The ID of the fulfillment provider handling this shipping option.
type:
$ref: ./AdminCreateShippingOptionType.yaml
prices:
type: array
description: The shipping option's prices.
items:
oneOf:
- type: object
description: The price's details.
x-schemaName: AdminCreateShippingOptionPriceWithCurrency
required:
- currency_code
- amount
properties:
currency_code:
type: string
title: currency_code
description: The price's currency code.
example: usd
amount:
type: number
title: amount
description: The price's amount.
- type: object
description: The price's details.
x-schemaName: AdminCreateShippingOptionPriceWithRegion
required:
- region_id
- amount
properties:
region_id:
type: string
title: region_id
description: The ID of the region this price is used in.
amount:
type: number
title: amount
description: The price's amount.
rules:
type: array
description: The shipping option's rules.
items:
$ref: ./AdminCreateShippingOptionRule.yaml