-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtcocv.raml
604 lines (600 loc) · 23 KB
/
tcocv.raml
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
#%RAML 0.8
title: TCOCV
version: 1.1
baseUri: http://server/api/{version}/tcocv
/customers:
get:
queryParameters:
type:
default: EXACT
enum: [FUZZY, EXACT]
consultationId:
bookingRef:
title:
firstName:
surname:
street:
postcode:
emailAddress:
telephoneNumber:
systemIdentifier:
description: Looks for customers using the elements provided as query parameters. This will return a list of customers, their current address and contact details
responses:
200:
description: A successful search that has returned at least one person. The data will always be returned in an array.
body:
application/json:
example: !include examples/search.json
204:
description: No customers were found with the provided search criteria. An empty array will be returned
body:
application/json:
example: |
[]
400:
description: The request failed validation. This should only occur if a search is required but the parameters were not set correctly
body:
application/json:
example: !include examples/search-invalid.json
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
post:
description: Creates a new customer resource. This will contain their personal information, address and other contact information
body:
application/json:
example: !include examples/create-customer.json
responses:
201:
headers:
customer-id:
type: string
description: The customer was created successfully
400:
description: The request failed validation. The exact errors are captured in the JSON response
body:
application/json:
example: !include examples/create-invalid.json
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
409:
description: The customer could not be created as another customer with the exact title, name and address. The response will include the identifier of that customer found
headers:
matched-customer-id:
type: string
body:
application/json:
example: !include examples/create-already-exists.json
/recommendation:
/update:
post:
description: Updates the customer recommendations.
body:
application/json:
example: !include examples/update-customer-recommendation.json
responses:
200:
description: The recommendation was upadted successfully
400:
description: The request was invalid
/handoverCode:
/{handoverCode}:
get:
description: Gets the specific customer information for this handover code
responses:
200:
description: The request was successful and a customer was found
body:
application/json:
example: !include examples/customer.json
400:
description: The request failed validation
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The request was successful but no customer was found with that handover code
/{customerID}:
get:
description: Gets the specific customer information for this identifier
responses:
200:
description: The request was succesful and a customer was found
body:
application/json:
example: !include examples/customer.json
204:
description: The request was succesful but no customer was found with that ID. An empty element is returned
body:
application/json:
example: |
{}
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
patch:
description: This allows elements of the customer resource to be updated or added to
responses:
200:
headers:
matches-found:
type: boolean
description: The patch call was succesful
400:
description: The request failed validation
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The customer belonging to id provided could not be found
body:
application/json:
example: !include examples/update-not-found.json
/statistics:
get:
description: Retrieves statistical informaiton for the provided customer id
responses:
200:
description: The request was successful
body:
application/json:
example: !include examples/stats.json
204:
description: The request was succesful but no customer was found with that ID. An empty element is returned
body:
application/json:
example: |
{}
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
/complaints:
get:
description: Get customer complaints
responses:
200:
description: The request was successful
body:
application/json:
example: !include examples/complaints.json
204:
description: The request was succesful but no customer was found with that ID. An empty element is returned
body:
application/json:
example: |
{}
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
/communications:
get:
description: Get communications sent to customer
responses:
200:
description: The request was successful
body:
application/json:
example: !include examples/communications.json
204:
description: The request was succesful but no customer was found with that ID. An empty element is returned
body:
application/json:
example: |
{}
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
/preferences:
get:
description: Get customer preferences
responses:
200:
description: The request was successful and preferences have been found
body:
application/json:
example: !include examples/preferences.json
204:
description: The request was succesful but no preferences were found. An empty element is returned
body:
application/json:
example: |
{}
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: No customer was found with the supplied customer ID
/wishlist:
get:
description: Get customer wishlists
responses:
200:
description: The request was successful
body:
application/json:
example: !include examples/wishlists.json
204:
description: The request was succesful but no customer was found with that ID. An empty element is returned
body:
application/json:
example: |
{}
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
/weRecommend:
get:
description: Retrieves a list of recomendations
responses:
200:
description: The request was successful
body:
application/json:
example: !include examples/we-recommend.json
204:
description: The request was succesful but no customer was found with that ID. An empty element is returned
body:
application/json:
example: |
{}
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
patch:
description: Updates a recomendation based on the cusotmers response
responses:
200:
description: The request was successful
body:
application/json:
example: !include examples/we-recommend-update.json
400:
description: The request failed validation
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The customer belonging to id provided could not be found
body:
application/json:
example: !include examples/update-not-found.json
/marketingOptions:
get:
description: Get customer marketing options
responses:
200:
description: The request was successful
body:
application/json:
example: !include examples/marketing-options.json
204:
description: The request was succesful but no customer was found with that ID. An empty element is returned
body:
application/json:
example: |
{}
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
/bookings:
get:
queryParameters:
fromDate:
toDate:
type:
description: Retrieve all bookings for customerId
responses:
200:
description: Valid response
body:
application/json:
example: !include examples/bookings.json
404:
description: The customer belonging to id provided could not be found
/booking:
/detail:
post:
description: Creates a booking, this will not interact with the summary block
body:
application/json:
example: !include examples/create-booking.json
responses:
201:
description: The booking was created succesfully
400:
description: The request failed validation
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The customer belonging to id provided could not be found
body:
application/json:
example: !include examples/create-booking-not-found.json
409:
description: The bookingId already exists
/{bookingID}:
/detail:
/dealFields:
patch:
description: This allows elements of the deal resource to be updated or added to
responses:
200:
description: The patch call was succesful
400:
description: The request was invalid
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The booking ID or customer does not exist
body:
application/json:
example: !include examples/booking-not-found.json
/travelLegs:
post:
description: Creates a new travel leg.
responses:
201:
description: The Travel Leg was created succesfully.
400:
description: Sequence number for the Travel Leg is empty or null.
404:
description: The Booking and Customer that the Travel Leg belongs to cannot be found.
409:
description: Travel Leg sequence number already exists.
/{legID}:
patch:
description: This allows elements of the travel leg resource to be updated or added to
responses:
200:
description: The patch call was succesful
400:
description: The request was invalid
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The travel leg ID does not exist
body:
application/json:
example: !include examples/travel-leg-not-found.json
/costings:
post:
description: Creates a booking costing.
responses:
201:
description: The costing creation was successful
400:
description: The request was invalid
404:
description: The booking and customer that the costing belongs to cannot be found
409:
description: Costing sequence number already exists
/{costingsID}:
patch:
description: This allows elements of the costings resource to be updated or added to
responses:
200:
description: The patch call was succesful
400:
description: The request was invalid
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The costings ID does not exist
body:
application/json:
example: !include examples/costing-not-found.json
/manifestsCombined:
post:
description: Creates a booking manifest.
responses:
201:
description: The manifest was created succesfully
400:
description: Sequence number for Manifest is empty or null.
404:
description: The booking and customer that the manifest belongs to cannot be found
409:
description: Manifest sequence number already exists
/{manifestID}:
patch:
description: This allows elements of the manifest resource to be updated or added to
responses:
200:
description: The patch call was succesful
400:
description: The request was invalid
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The manifest ID does not exist
body:
application/json:
example: !include examples/manifest-not-found.json
/enquiries:
get:
description: Retrieve all enquiries for customerID
responses:
200:
description: Valid response
body:
application/json:
example: |
{}
404:
description: The customer belonging to ID provided could not be found
/enquiry:
/detail:
post:
description: Creates an enquiry, this will not interact with the summary block
body:
application/json:
example: !include examples/create-enquiry.json
responses:
201:
description: The enquiry was created succesfully
400:
description: The request failed validation
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The customer belonging to ID provided could not be found
body:
application/json:
example: !include examples/create-enquiry-not-found.json
409:
description: The enquiryID already exists
/{enquiryID}:
/detail:
/dealFields:
patch:
description: This allows elements of the deal resource to be updated or added to
responses:
200:
description: The patch call was succesful
400:
description: The request was invalid
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The enquiry ID or customer does not exist
body:
application/json:
example: !include examples/enquiry-not-found.json
/travelLegs:
post:
description: Creates a new travel leg.
responses:
201:
description: The Travel Leg was created succesfully.
400:
description: Sequence number for the Travel Leg is empty or null.
404:
description: The Enquiry and Customer that the Travel Leg belongs to cannot be found.
409:
description: Travel Leg sequence number already exists.
/{legID}:
patch:
description: This allows elements of the travel leg resource to be updated or added to
responses:
200:
description: The patch call was succesful
400:
description: The request was invalid
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The travel leg ID does not exist
body:
application/json:
example: !include examples/travel-leg-not-found.json
/costings:
post:
description: Creates an enquiry costing.
responses:
201:
description: The costing creation was successful
400:
description: The request was invalid
404:
description: The booking and customer that the costing belongs to cannot be found
409:
description: Costing sequence number already exists
/{costingsID}:
patch:
description: This allows elements of the costings resource to be updated or added to
responses:
200:
description: The patch call was succesful
400:
description: The request was invalid
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The costings ID does not exist
body:
application/json:
example: !include examples/costing-not-found.json
/manifestsCombined:
post:
description: Creates a booking manifest.
responses:
201:
description: The manifest was created succesfully
400:
description: Sequence number for Manifest is empty or null.
404:
description: The booking and customer that the manifest belongs to cannot be found
409:
description: Manifest sequence number already exists
/{manifestID}:
patch:
description: This allows elements of the manifest resource to be updated or added to
responses:
200:
description: The patch call was succesful
400:
description: The request was invalid
403:
description: The access failed authentication
body:
application/json:
example: !include examples/security.json
404:
description: The manifest ID does not exist
body:
application/json:
example: !include examples/manifest-not-found.json