-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathshipping_methods__v1.yml
255 lines (254 loc) · 6.83 KB
/
shipping_methods__v1.yml
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
openapi: 3.0.0
info:
version: '1'
title: ShippingMethods
description: 'Service howtolist. 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
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/GetShippingBody'
'400':
description: 'Invalid input data'
components:
schemas:
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
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
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
# TR
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
nullable: true
enum:
- '1'
- '2'
- '3'
example: '1'
# PU
puCommodityCode:
description: 'Commodity Code for PU affects the price'
type: string
nullable: true
example: '0319'
# WPS
wpsCategory:
description: 'Wps Category. Tubes, Tires, Wheels'
type: string
nullable: true
example: 'Tubes'
wpsDropShipFee:
description: 'Shipping Price. Enum - FR, 18, 12, 35..'
type: string
nullable: true
example: '9.75'
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: '30.01.2020 09:00:00'
shippingArriveDate:
nullable: true
type: string
example: '03.02.2020 09:00:00'
shippingSendDate:
type: string
example: '03.02.2020 09:00:00'
carrier:
type: string
enum:
- Usps
- Fedex
- Ups
example: Fedex
nullable: true
xml:
name: Shipping
GetShippingBody:
type: object
properties:
data:
type: array
description: 'Found delivery methods'
items:
$ref: '#/components/schemas/ShippingResponse'
messages:
type: array
description: 'Collection of messages. There may be errors, notes and more.'
items:
$ref: '#/components/schemas/Message'
xml:
name: GetShippingBody
Message:
type: object
required:
- level
properties:
level:
type: string
description: 'Message level (type)'
example: 'error'
message:
type: string
nullable: true
description: 'Message text'
example: 'DataStore Test unavailable.'
xml:
name: Message