|
1
|
type: object |
|
2
|
description: The flat rate shipping option's details. |
|
3
|
x-schemaName: AdminCreateFlatRateShippingOption |
|
4
|
required: |
|
5
|
- price_type |
|
6
|
- prices |
|
7
|
- name |
|
8
|
- service_zone_id |
|
9
|
- shipping_profile_id |
|
10
|
- provider_id |
|
11
|
properties: |
|
12
|
name: |
|
13
|
type: string |
|
14
|
title: name |
|
15
|
description: The flat-rate shipping option's name. |
|
16
|
service_zone_id: |
|
17
|
type: string |
|
18
|
title: service_zone_id |
|
19
|
description: The ID of the associated service zone. |
|
20
|
shipping_profile_id: |
|
21
|
type: string |
|
22
|
title: shipping_profile_id |
|
23
|
description: The ID of the associated shipping profile. |
|
24
|
data: |
|
25
|
type: object |
|
26
|
description: >- |
|
27
|
The flat-rate shipping option's data, useful for the fulfillment provider |
|
28
|
handling its processing. |
|
29
|
externalDocs: |
|
30
|
url: >- |
|
31
|
https://docs.medusajs.com/resources/commerce-modules/fulfillment/shipping-option#data-property |
|
32
|
price_type: |
|
33
|
type: string |
|
34
|
description: >- |
|
35
|
The shipping option's price type. If `flat`, the shipping option has a |
|
36
|
fixed price set in `prices`. Otherwise, the shipping option's price is |
|
37
|
calculated by the fulfillment provider. |
|
38
|
enum: |
|
39
|
- flat |
|
40
|
- calculated |
|
41
|
provider_id: |
|
42
|
type: string |
|
43
|
title: provider_id |
|
44
|
description: The ID of the fulfillment provider handling this shipping option. |
|
45
|
type: |
|
46
|
$ref: ./AdminCreateShippingOptionType.yaml |
|
47
|
prices: |
|
48
|
type: array |
|
49
|
description: The shipping option's prices. |
|
50
|
items: |
|
51
|
oneOf: |
|
52
|
- type: object |
|
53
|
description: The price's details. |
|
54
|
x-schemaName: AdminCreateShippingOptionPriceWithCurrency |
|
55
|
required: |
|
56
|
- currency_code |
|
57
|
- amount |
|
58
|
properties: |
|
59
|
currency_code: |
|
60
|
type: string |
|
61
|
title: currency_code |
|
62
|
description: The price's currency code. |
|
63
|
example: usd |
|
64
|
amount: |
|
65
|
type: number |
|
66
|
title: amount |
|
67
|
description: The price's amount. |
|
68
|
rules: |
|
69
|
type: array |
|
70
|
description: The price's rules. |
|
71
|
items: |
|
72
|
type: object |
|
73
|
description: The rule's details. |
|
74
|
x-schemaName: PriceRule |
|
75
|
required: |
|
76
|
- attribute |
|
77
|
- operator |
|
78
|
- value |
|
79
|
properties: |
|
80
|
attribute: |
|
81
|
type: string |
|
82
|
title: attribute |
|
83
|
description: The rule's attribute. |
|
84
|
operator: |
|
85
|
type: string |
|
86
|
description: The rule's operator. |
|
87
|
enum: |
|
88
|
- gt |
|
89
|
- lt |
|
90
|
- eq |
|
91
|
- lte |
|
92
|
- gte |
|
93
|
value: |
|
94
|
type: number |
|
95
|
title: value |
|
96
|
description: The rule's value. |
|
97
|
- type: object |
|
98
|
description: The price's details. |
|
99
|
x-schemaName: AdminCreateShippingOptionPriceWithRegion |
|
100
|
required: |
|
101
|
- region_id |
|
102
|
- amount |
|
103
|
properties: |
|
104
|
region_id: |
|
105
|
type: string |
|
106
|
title: region_id |
|
107
|
description: The ID of the region this price is used in. |
|
108
|
amount: |
|
109
|
type: number |
|
110
|
title: amount |
|
111
|
description: The price's amount. |
|
112
|
rules: |
|
113
|
type: array |
|
114
|
description: The price's rules. |
|
115
|
items: |
|
116
|
type: object |
|
117
|
description: The rule's details. |
|
118
|
x-schemaName: PriceRule |
|
119
|
required: |
|
120
|
- attribute |
|
121
|
- operator |
|
122
|
- value |
|
123
|
properties: |
|
124
|
attribute: |
|
125
|
type: string |
|
126
|
title: attribute |
|
127
|
description: The rule's attribute. |
|
128
|
operator: |
|
129
|
type: string |
|
130
|
description: The rule's operator. |
|
131
|
enum: |
|
132
|
- gt |
|
133
|
- lt |
|
134
|
- eq |
|
135
|
- lte |
|
136
|
- gte |
|
137
|
value: |
|
138
|
type: number |
|
139
|
title: value |
|
140
|
description: The rule's value. |
|
141
|
type_id: |
|
142
|
type: string |
|
143
|
title: type_id |
|
144
|
description: The ID of the shipping option type that this shipping option belongs to. |
|
145
|
rules: |
|
146
|
type: array |
|
147
|
description: The shipping option's rules. |
|
148
|
items: |
|
149
|
$ref: ./AdminCreateShippingOptionRule.yaml |
|
150
|
metadata: |
|
151
|
type: object |
|
152
|
description: The shipping option's metadata. |