-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbooking.yml
1184 lines (1184 loc) · 36.8 KB
/
booking.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
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
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
openapi: 3.0.0
info:
description: API to create transport bookings in Linfox TMS
version: "V1"
title: Linfox Customer Portal Booking API
contact:
email: [email protected]
tags:
- name: developers
description: API available for developers
- name: booking
description: API available for create bookings
paths:
/ping:
summary: /ping
get:
tags:
- developers
summary: return API version
operationId: ping
parameters: []
responses:
'200':
description: current API version
headers: {}
content:
application/json:
schema:
type: object
properties:
version:
type: string
description: API version
example: v01
examples: {}
links: {}
'401':
$ref: '#/components/responses/UnauthorizedError'
/services:
get:
tags:
- booking
summary: get transport services
operationId: getServices
description: |
return available service types for a given contract
parameters:
- in: query
name: contractID
description: contract unique identifier
required: true
schema:
type: string
responses:
'200':
description: list of service types for the contract
content:
application/json:
schema:
$ref: '#/components/schemas/getServices_response'
'400':
description: bad input parameter
/commodities:
get:
tags:
- booking
summary: get commodities
operationId: getCommodities
description: |
return available commodities for a given service
parameters:
- in: query
name: contractID
description: contract unique identifier
required: true
schema:
type: string
format: uuid
example: 157addc6-b980-43ae-925b-64cb7a4eab0e
- in: query
name: serviceID
description: service unique identifier
required: true
schema:
type: string
format: uuid
example: 157addc6-b980-43ae-925b-64cb7a4eab0e
responses:
'200':
description: list of commodities for the service
content:
application/json:
schema:
$ref: '#/components/schemas/getCommodities_response'
'400':
description: bad input parameter
/templates:
get:
tags:
- booking
summary: get booking template
operationId: getTemplates
parameters:
- name: contractID
in: query
description: contract unique identifier
schema:
type: string
format: uuid
example: 157addc6-b980-43ae-925b-64cb7a4eab0e
- name: serviceID
in: query
description: service unique identifier
schema:
type: string
format: uuid
example: 157addc6-b980-43ae-925b-64cb7a4eab0e
- name: commodityID
in: query
description: commodity unique identifier
required: false
schema:
type: string
format: uuid
example: 157addc6-b980-43ae-925b-64cb7a4eab0e
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/getTemplates_response'
'400':
description: bad request
/tempaltes/{templateID}:
get:
tags:
- booking
summary: get booking template
operationId: getTemplateByID
parameters:
- name: templateID
in: path
description: template unique identifier
required: true
schema:
type: string
format: uuid
example: 157addc6-b980-43ae-925b-64cb7a4eab0e
responses:
'200':
description: get the template by template identifier
content:
application/json:
schema:
$ref: '#/components/schemas/getTemplateByID_response'
'400':
description: bad input parameter
/bookings/{bookingID}:
get:
tags:
- booking
summary: get the booking details by booking identifier
operationId: getBookingByID
parameters:
- name: bookingID
in: path
description: booking unique identifier
required: true
schema:
type: string
format: uuid
example: 157addc6-b980-43ae-925b-64cb7a4eab0e
responses:
'200':
description: OK
content:
application/json:
schema:
$ref: '#/components/schemas/getBookingByID_response'
'400':
description: bad request
/bookings:
get:
tags:
- booking
summary: get all bookings
operationId: getBookings
description: |
search bookings
parameters:
- in: query
name: contractID
description: contract unique identifier
required: false
schema:
type: string
- in: query
name: serviceID
description: service unique identifier
required: false
schema:
type: string
- in: query
name: limit
description: the number of items to return in one request. Limit is default to 10 if the limit parameter is not specified. The value is capped at 100.
required: false
schema:
type: integer
- in: query
name: start
description: the number of items to skip before selecting.
required: false
schema:
type: integer
- in: query
name: sort
description: sort expression
required: false
schema:
type: string
- in: query
name: keyword
description: search for booking nujmber and customer reference number
required: false
schema:
type: string
- in: query
name: location
description: search on pickup and delivery locations
required: false
schema:
type: string
- in: query
name: status
description: booking status search
required: false
schema:
type: string
- in: query
name: createdBy
description: search for booking createdBy user and account
required: false
schema:
type: string
responses:
'200':
description: list of commodities for the service
content:
application/json:
schema:
$ref: '#/components/schemas/getBookings_response'
'400':
description: bad input parameter
post:
tags:
- booking
summary: create a new booking
operationId: createBooking
requestBody:
content:
application/json:
schema:
$ref: '#/components/schemas/booking'
responses:
'201':
description: booking created
content:
application/json:
schema:
$ref: '#/components/schemas/createBooking_response'
'400':
description: bad request
components:
securitySchemes:
jwt:
type: http
scheme: bearer
bearerFormat: JWT
schemas:
getServices_response:
required:
- data
- id
- status
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/service'
id:
type: string
example: ee43d051-b763-4070-b619-b7e95c5ea304
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/error'
status:
type: string
example: SUCCESS
enum:
- SUCCESS
- ERROR
getCommodities_response:
required:
- data
- id
- status
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/commodity'
id:
type: string
example: ee43d051-b763-4070-b619-b7e95c5ea304
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/error'
status:
type: string
example: SUCCESS
enum:
- SUCCESS
- ERROR
getTemplates_response:
required:
- data
- id
- status
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/template'
id:
type: string
example: ee43d051-b763-4070-b619-b7e95c5ea304
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/error'
status:
type: string
example: SUCCESS
enum:
- SUCCESS
- ERROR
getTemplateByID_response:
required:
- data
- id
- status
type: object
properties:
data:
$ref: '#/components/schemas/template'
id:
type: string
example: ee43d051-b763-4070-b619-b7e95c5ea304
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/error'
status:
type: string
example: SUCCESS
enum:
- SUCCESS
- ERROR
getBookings_response:
required:
- data
- id
- status
- pagination
type: object
properties:
data:
type: array
items:
$ref: '#/components/schemas/booking'
pagination:
$ref: '#/components/schemas/pagination'
id:
type: string
example: 'ee43d051-b763-4070-b619-b7e95c5ea304'
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/error'
status:
type: string
enum: ['SUCCESS', 'ERROR']
example: SUCCESS
getBookingByID_response:
required:
- data
- id
- status
type: object
properties:
data:
$ref: '#/components/schemas/booking'
id:
type: string
example: ee43d051-b763-4070-b619-b7e95c5ea304
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/error'
status:
type: string
example: SUCCESS
enum:
- SUCCESS
- ERROR
createBooking_response:
required:
- data
- id
- status
type: object
properties:
data:
type: array
items:
type: object
properties:
bookingID:
type: string
format: uuid
description: booking unique identifier
example: 4eb218e2-c0bc-4c66-9c69-8b679754f734
tmsReferenceNumber:
type: string
description: shipment reference number from the TMS
example: 1224785
id:
type: string
example: ee43d051-b763-4070-b619-b7e95c5ea304
message:
type: string
errors:
type: array
items:
$ref: '#/components/schemas/error'
status:
type: string
example: SUCCESS
enum:
- SUCCESS
- ERROR
service:
type: object
required:
- contractID
- contractCode
- contractName
- serviceID
- serviceCode
- serviceName
properties:
serviceID:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
serviceCode:
type: string
example: G
serviceName:
type: string
example: General freight
contractID:
type: string
format: uuid
example: 1e34790a-fdd1-ea11-a813-000d3acb4d13
contractCode:
type: string
example: 123457896
contractName:
type: string
format: string
example: Cement Australia
commodity:
type: object
required:
- contractID
- contractCode
- contractName
- serviceID
- serviceCode
- serviceName
- commodityID
- commodityCode
- commodityName
properties:
contractID:
type: string
format: uuid
example: 1e34790a-fdd1-ea11-a813-000d3acb4d13
contractCode:
type: string
example: 123457896
contractName:
type: string
format: string
example: Cement Australia
serviceID:
type: string
format: uuid
example: d290f1ee-6c54-4b01-90e6-d701748f0851
serviceCode:
type: string
example: G
serviceName:
type: string
example: Airfreight
commodityID:
type: string
format: uuid
example: 15935f36-4e55-eb11-a812-000d3a6b55c5
commodityCode:
type: string
example: Amb
commodityName:
type: string
example: Ambient
template:
type: object
required:
- templateID
- contractID
- serviceID
- templateName
- templateVersion
- templateJSON
properties:
templateID:
type: string
format: uuid
description: Booking template unique identifier
example: 1e34790a-fdd1-ea11-a813-000d3acb4d13
contractID:
type: string
format: uuid
description: system contract identifier
example: 1e34790a-fdd1-ea11-a813-000d3acb4d13
serviceID:
type: string
format: uuid
description: system service identifier
example: 1e34790a-fdd1-ea11-a813-000d3acb4d13
commodityID:
type: string
format: uuid
description: system commodity identifier
example: 1e34790a-fdd1-ea11-a813-000d3acb4d13
templateName:
type: string
format: string
description: Booking template name
example: FMG-AIR-AMB
templateVersion:
type: string
format: string
description: Booking template version
example: v1
templateJSON:
type: string
description: booking template JSON in base64 encoded string
example: adfkjkdfjksd;fj
booking:
type: object
required:
- bookingID
- bookingTemplateID
- bookingTemplateName
- bookingTemplateVersion
- contractID
- contractCode
- contractName
- serviceID
- serviceCode
- serviceName
- commodityID
- commodityCode
- commodityName
- bookingStatus
- pickupDetails
- deliveryDetails
- items
- equipments
properties:
bookingID:
type: string
description: unique booking identifier
example: 1001220
bookingTemplateID:
type: string
description: system template identifier
example: 1e34790a-fdd1-ea11-a813-000d3acb4d13
bookingTemplateName:
type: string
description: template name for the booking
example: FMG-AIR-AMB
bookingTemplateVersion:
type: string
description: template version for the booking
example: v1
bookingStatus:
type: string
description: transaction status
example: Submitted
enum:
- Draft
- Saved
- Submitted
- Approved
- Cancelled
contractID:
type: string
format: uuid
description: System contract identifier
example: 1e34790a-fdd1-ea11-a813-000d3acb4d13
contractCode:
type: string
description: Business contract ID usually also used in SAP TM, BY TMS, and SAP ECC
example: 40264426
contractName:
type: string
format: string
description: Name of the business contract
example: Cement Australia
serviceID:
type: string
format: uuid
description: System service identifier
example: d290f1ee-6c54-4b01-90e6-d701748f0851
serviceCode:
type: string
description: Transportation Service code
example: G
serviceName:
type: string
description: Name of the transportation service like Rail or Air
example: General Transport
commodityID:
type: string
format: uuid
description: System commodity identifier
example: 15935f36-4e55-eb11-a812-000d3a6b55c5
commodityCode:
type: string
description: ID for the freight commodity
example: Amb
commodityName:
type: string
description: Commodity usually describes the temperature requirements for freight transportation
example: Ambient
bookingNumber:
type: string
description: unique booking number
example: B123456
customerReferenceNumber:
type: string
description: booking reference number provided by the customer
example: ABC123
shipmentNumber:
type: string
description: Shipmet number from TMS
example: 54564654
urgentFlag:
type: boolean
description: indicator denominates that booking is to be handled urgently by the teams. This indicator influences communication and creation of Customer Service Cases
example: true
dangerousGoodsIndicator:
type: boolean
description: Dangerous Goods Indicator Flag at Booking Level. It influences TM, BY TMS and the Portal functionality.
example: false
overDimensionalFlag:
type: boolean
description: This flag is set by the user when the measurements of he freight exceed the dimensions of the vehicle.
example: false
additionalReferences:
type: array
items:
$ref: '#/components/schemas/additionalReference'
creationDateTime:
type: string
format: date-time
description: UTC time Stamp of when the Booking record was first created.
example: '2021-01-22T10:30:00Z'
modifiedDateTime:
type: string
format: date-time
description: UTC time Stamp of when the Booking record was last modified.
example: '2021-01-22T10:30:00Z'
createdBy:
type: string
description: User name who created the Booking.
example: [email protected]
createdByAccount:
type: string
description: Account which created the booking.
example: Westrac
createdForAccount:
type: string
description: Account for which the booking was created for.
example: FMG
pickupDetails:
type: object
properties:
location:
$ref: '#/components/schemas/location'
contact:
$ref: '#/components/schemas/contact'
pickUpReference:
type: string
description: Reference that needs to be quoted when freight is picked up.
pickupInstruction:
type: string
description: Instructions to the truck driver who is collecting the freight.
pickupFromDateTime:
type: string
format: date-time
description: Start of the Time Window (UTC) from which the freight can be picked up.
example: '2021-01-21T09:00:00Z'
pickupToDateTime:
type: string
format: date-time
description: End of the Time Window (UTC) to which the freight can be collected.
example: '2021-01-21T18:00:00Z'
deliveryDetails:
type: object
properties:
location:
$ref: '#/components/schemas/location'
contact:
$ref: '#/components/schemas/contact'
deliveryReference:
type: string
description: Reference that needs to be quoted when freight is dropped off.
deliveryInstruction:
type: string
description: Instructions to the truck driver who is delivering the freight.
deliveryFromDateTime:
type: string
format: date-time
description: Start of the Time Window (UTC) from which the freight can be delivered.
example: '2021-01-22T09:00:00Z'
deliveryToDateTime:
type: string
format: date-time
description: End of the Time Window to (UTC) which the freight can be delivered.
example: '2021-01-22T18:00:00Z'
railTransport:
$ref: '#/components/schemas/railTransport'
documents:
type: array
items:
$ref: '#/components/schemas/document'
items:
type: array
items:
$ref: '#/components/schemas/item'
equipments:
type: array
items:
$ref: '#/components/schemas/equipment'
additionalReference:
type: object
required:
- name
- value
properties:
name:
type: string
description: name of reference field
example: Customer
value:
type: string
description: value of the reference field
example: BHP
location:
type: object
required:
- locationCode
properties:
locationID:
type: string
format: uuid
description: System location identifier
example: 64f9389e-2f40-418c-be9d-9f5da4098092
locationCode:
type: string
description: Location code in the TMS
example: LFXGHO
locationName:
type: string
description: Company Name (if applicable)
example: Linfox Logistics HQ
address1:
type: string
description: House Number, Street Name, and Street Type
example: 55 English Street
address2:
type: string
description: Additional text if needed
example:
suburb:
type: string
description: Suburb name
example: Essendon Fields
postcode:
type: string
description: Post code
example: 3041
state:
type: string
description: State short code
example: VIC
country:
type: string
description: Country name
example: Australia
coordinates:
$ref: '#/components/schemas/coordinates'
coordinates:
type: object
required:
- latitude
- longitude
properties:
latitude:
type: number
description: Geospecial Value, latitude of the location
example: 37.7254569
longitude:
type: number
description: Geospecial Value, longitude of the location
example: 144.8950268
railTransport:
type: object
properties:
railOrigin:
type: string
description: Rail Station code where the freight is lodged on the train.
example: ALT
railDestination:
type: string
description: Rail Station code where the freight is unloaded from the train.
example: MDE
railDepartureDateTime:
type: string
format: date-time
description: UTC Date and Time of the scheduled train departure from the Rail Origin
example: '2021-01-21T18:00:00Z'
shippingLLOYDS:
type: string
description: Registration Name / Number of the a vessel in the Lloyd's register. Also referred to as IMO.
example:
shippingACOS:
type: string
description: Vessel registration Number with the Australian Chamber of Shipping (ACOS)
example: ABCD12345
shippingVessel:
type: string
description: Vessel Name that on which the freight is nominated to travel.
example: SPIRIT OF TASMANIA II
shippingOutVoyage:
type: string
description: Sequence Number of the outbound journey from port
example: 612
shippingLoadingPort:
type: string
description: Code of the Port where the freight is loaded on the vessel.
example: AUMEL
shippingCompany:
type: string
description: Company that handles the paperwork and insurance for the freight on he vessel.
example: Hapag Lloyd
shippingLateApproved:
type: boolean
description: Indicator denotes that the arrival of the freight to the port has been approved to be late
example: true
shippingDischargePort:
type: string
description: Code of the Port where the freight is discharged from the vessel
example: AUBNE
shippingFinalDestination:
type: string
description: name of the city that is the final destination for the freight
example: Moreton Bay
shippingStevedore:
type: string
description: Company who is responsible to stevedoring the vessel whilst in port.
example: Patricks
shippingUnderBond:
type: boolean
description: Indicator showing if the freight is travelling under a bond document issued by Customs
example: true
additionalReferences:
type: array
items:
$ref: '#/components/schemas/additionalReference'
document:
type: object
properties:
documentType:
type: string
description: The type of the document
example: ImageOverDimensional
name:
type: string
description: The name of attached document
example: abc.png
contentType:
type: string
description: Specify the media type of the document
example: image/png
url:
type: string
description: The url link where the document is stored.
example: https//documents.linfox.com/booking/123/abc.png
item:
type: object
properties:
lineItemID:
type: string
description: Multiple Line Items can be added to the ITEMS section of the booking. This is the Line Indicator
example: 10
itemType:
type: string
description: Denotes the type of item. Exchange Pallets like Chep are also items.
example: 45HRC
itemDecription:
type: string
description: Description of the Item
example: 45 Foot HQ Rail Container
productID:
type: string
description: Product number or Product name also referred to as SKU.
example: ABCD-12345-90
itemQty:
type: number
description: Number of items in this item line of this Booking
example: 12
itemLength:
type: number
description: Length of the individual item
example: 40
itemWidth:
type: number
description: Width of the individual item
example: 20
itemHeight:
type: number
description: Height of the individual item
example: 60
itemDimsUOM:
type: string
description: Unit Of Measure for all dimensions
example: CM
itemVolume:
type: number
description: Cubic Volume of the individual item
example: 60
itemVolumeUOM:
type: number
description: Unit Of Measure of the cubic volume
example: CBM
itemGrossWeight:
type: number
description: Gross Weight of the individual item (includes packaging)
example: 200
itemWeightUOM:
type: number
description: Unit Of Measure of the weight
example: 20
itemReference:
type: string
description: Reference related to the individual item like a Purchase Order Number
example: