-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathshipping_methods__v1.yml
More file actions
293 lines (293 loc) · 8.09 KB
/
shipping_methods__v1.yml
File metadata and controls
293 lines (293 loc) · 8.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
openapi: 3.0.0
info:
version: "1"
title: "ShippingMethods"
description: "Generated by Manifests generator v1.5.3. The service provides methods for obtaining possible delivery methods according to the specified parameters"
externalDocs:
url: https://github.com/rollun-com/service-howtobay
servers:
- url: http://carriers/openapi/ShippingMethods/v1
- url: http://host.docker.internal:8080/openapi/ShippingMethods/v1
- url: http://localhost:8080/openapi/ShippingMethods/v1
tags:
- name: Shipping
description: "Everything about shipping methods."
paths:
/shipping:
post:
tags:
- Shipping
summary: "Getting Shipping Methods"
description: "Returns possible shipping methods with prices, sender, and delivery time."
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingInfo'
responses:
"200":
description: "Successful operation"
content:
application/json:
schema:
$ref: '#/components/schemas/ShippingResult'
"500":
description: "Internal error"
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResult'
components:
schemas:
ErrorResult:
type: object
properties:
messages:
type: array
items:
$ref: "#/components/schemas/Message"
description: "Message field is not required"
Message:
type: object
properties:
level:
type: string
enum:
- emergency
- alert
- critical
- error
- warning
- notice
- info
- debug
description: "Message level (like in a logger)"
type:
type: string
enum:
- UNDEFINED
- LOGGER_MESSAGE
description: "Type of the message"
text:
type: string
description: "Message describing what went wrong"
SuccessResult:
allOf:
- $ref: '#/components/schemas/ErrorResult'
type: object
properties:
data:
type: object
ShippingResult:
allOf:
- $ref: '#/components/schemas/SuccessResult'
type: object
properties:
data:
$ref: '#/components/schemas/ShippingResultItem'
ShippingResultItem:
type: array
description: "Found delivery methods"
items:
$ref: '#/components/schemas/ShippingResponse'
ShippingInfo:
type: object
required:
- zipTo
- weight
- width
- length
- height
properties:
zipTo:
type: string
example: "78228"
weight:
type: number
example: 1.0
width:
type: number
example: 2.0
length:
type: number
example: 3.5
height:
type: number
example: 4.0
senders:
type: array
nullable: true
items:
type: string
example: pu_fast_ds
description: au_ds, rm_ds, tft_ds, pu_fast_ds, pu_short_delay_ds, pu_long_delay_ds, wps_ds, pickup_ut, pickup_cn
isDangerous:
description: "Whether the package contains hazardous materials. It is necessary to determine the possibility of sending by air."
type: boolean
example: false
nullable: true
isTire:
description: "Flag affects the validator"
type: boolean
example: false
nullable: true
# RM
rmCategory:
description: "Category for RM, affects the price"
type: string
example: "Filters"
nullable: true
rmIsKit:
description: "IsKit for RM, affects the price"
type: boolean
example: false
nullable: true
rmDropShipShippingPrice:
description: "Price for shipping from RM"
type: number
example: 10.0
nullable: true
rmFee:
description: "A fee of RM, affects the price"
type: number
example: 10.2
nullable: true
rmIsOversize:
description: "Flag IsOversize for RM, affects the price"
type: string
enum:
- Y
- N
example: Y
nullable: true
# AU
auIsFirstClass:
description: "If possible, then send a parcel First Class"
type: string
enum:
- Y
- N
example: Y
nullable: true
auFlatRateGroup:
description: "Flag affects the price"
type: string
example: ATV25
nullable: true
auLargePackageSurcharge:
description: "Flag affects the price"
type: number
example: 10.2
nullable: true
trWidth:
description: "A flag that matches the width, but may be different. Affects the price"
type: number
example: 3.1
nullable: true
trHeight:
description: "A flag that matches the height, but may be different. Affects the price"
type: number
example: 3.1
nullable: true
trLength:
description: "A flag that matches the length, but may be different. Affects the price"
type: number
example: 3.1
nullable: true
trSubcategory:
description: "Flag affects the price"
type: string
example: "Offroad Tires"
nullable: true
trNewCategory:
description: "Flag affects the price"
type: string
example: "TIRES"
nullable: true
trNewSubCategory:
description: "Flag affects the price"
type: string
example: "KITS"
nullable: true
trFee:
description: "Flag affects the price"
type: number
example: 1.3
nullable: true
trIsOversize:
description: "Flag affects the price"
type: string
enum:
- "1"
- "2"
- "3"
example: "1"
nullable: true
puCommodityCode:
description: "Commodity Code for PU affects the price"
type: string
example: "0319"
nullable: true
# WPS
wpsCategory:
description: "Wps Category. Tubes, Tires, Wheels"
type: string
example: "Tubes"
nullable: true
wpsDropShipFee:
description: "Shipping Price. Enum - FR, 18, 12, 35.."
type: string
example: "9.75"
nullable: true
# TFT
tftProductPrice:
description: "TFT product price, need to TFT discount"
type: number
example: 11.5
nullable: true
csn:
description: "Customer Stock Number"
type: string
example: "ABC12345"
nullable: true
ShippingResponse:
type: object
required:
- deliverySender
- shippingMethodId
- shippingMethodName
- trackNumberDate
- cost
properties:
deliverySender:
type: string
example: "wps_ds"
shippingMethodId:
type: string
example: "PU-PickUp-Usps-PM-FR-BgBox"
shippingMethodName:
type: string
example: "Priority Mail Large Flat Rate Board Game Box"
cost:
type: number
example: 5.84
nullable: true
trackNumberDate:
type: string
example: "2020-01-30T09:00:00Z"
shippingArriveDate:
type: string
nullable: true
example: "2020-02-03T09:00:00Z"
shippingSendDate:
type: string
example: "2020-02-03T09:00:00Z"
carrier:
type: string
enum:
- Usps
- Fedex
- Ups
example: Fedex
nullable: true