-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathCustomsDetailV2.yaml
More file actions
1256 lines (1252 loc) · 51.7 KB
/
CustomsDetailV2.yaml
File metadata and controls
1256 lines (1252 loc) · 51.7 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
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.1.0
info:
title: Customs Detail API v2
version: "1.0"
description: >
# Product Info
Provides clients with up‑to‑date compliance requirements for data fields that must be captured for UPS shipments. The API then validates these field values and submits them for backend merging into the shipment. For more information on the Customs Detail API, please visit the <a href="https://developer.ups.com/api/reference/customsdetail/product-info"
target="_blank" rel="noopener">Product Info</a> page.<br/><br/>
# Key Business Values
- Ensures clients always receive the latest compliance requirements.
- Allows field collection to be fully managed through configurable user settings.
- Flexible framework eliminates additional code changes as compliance fields evolve.
- Flexible field model supports new country rules without disruptive changes, so you can expand lanes and stay current as regulations evolve.
# Reference
- <a href="https://developer.ups.com/api/reference/customdetails/error-codes" target="_blank" rel="noopener">Errors</a>
- <a href="https://developer.ups.com/api/reference/customdetails/faq" target="_blank" rel="noopener">FAQ</a>
<br/>
<p>Try out UPS APIs with example requests using Postman and learn more about the UPS Postman Collection by visiting our <a href="https://developer.ups.com/api/reference/postman/guide"
target="_blank" rel="noopener">Postman Guide</a>. Explore API documentation and sample applications through GitHub.</p>
<a href="https://god.gw.postman.com/run-collection/29542085-f2cd7176-bd05-48ea-bb72-b359a11cff09?action=collection%2Ffork&source=rip_markdown&collection-url=entityId%3D29542085-f2cd7176-bd05-48ea-bb72-b359a11cff09%26entityType%3Dcollection%26workspaceId%3D7e7595f0-4829-4f9a-aee1-75c126b9d417" target="_blank" rel="noopener noreferrer">
<img src="https://run.pstmn.io/button.svg" alt="Run In Postman" style="width: 128px; height: 32px;"></a>
<a href="https://github.com/UPS-API" target="_blank" rel="noopener noreferrer">
<img src="https://www.ups.com/assets/resources/webcontent/images/gitHubButton.svg" alt="Open in GitHub " style="width: 128px; height: 32px;">
</a>
servers:
- url: https://onlinetools.ups.com/api/trade/compliance/{version}
description: Production
variables:
version:
default: v2
enum:
- v2
- url: https://wwwcie.ups.com/api/trade/compliance/{version}
description: CIE
variables:
version:
default: v2
enum:
- v2
tags:
- name: Customs Detail
description: Endpoints related to the required fields
paths:
/content/fields/customs-detail:
post:
summary: Validate and/or submit the fields
description: This endpoint will provide the ability to validate and/or submit the additional field information for a shipment
parameters:
- $ref: "#/components/parameters/transId"
- $ref: "#/components/parameters/transactionSrc"
- $ref: "#/components/parameters/Content-Type"
- name: version
in: path
description: version
required: true
schema:
type: string
default: v2
enum:
- v2
operationId: postCustomDetailData
security:
- OAuth2: []
tags:
- Customs Detail
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/CustomDetailsPostFieldsRequestv2"
example:
actionType: save
shipperNumber: 1443YY
trackingNumber: 1Z1443YY0161231327
shipmentMetaData:
- groupKey: US-IMP-CDC
fields:
- fieldKey: ImportLicenseNumber
regulationSections:
- sectionKey: Bio
fieldValue: "123412351234123"
- groupKey: IN-EXP-CSB
fields:
- fieldKey: CSBType
fieldValue: "3"
- fieldKey: IECCode
fieldValue: "99"
products:
- productId: PART-001
productDescription: Medical device
commodityCode: "3821000010"
productMetaData:
- groupKey: IN-EXP-CSB
fields:
- fieldKey: Amount
fieldValue: "10"
- fieldKey: CurrencyCode
fieldValue: USD
- groupKey: US-IMP-FDA
fields:
- fieldKey: MnuNa
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
fieldValue: UPS Labs
- fieldKey: MnuAdLn1Te
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
fieldValue: "55 Glenlake Pkwy NE"
- fieldKey: MnuAdLn2Te
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
fieldValue: "Suite 400"
- fieldKey: MnuAdLn3Te
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
fieldValue: "Building C"
- fieldKey: MnuCtyNa
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
fieldValue: "Atlanta"
- fieldKey: MnuStPrvCd
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
fieldValue: "GA"
- fieldKey: MnuCtyCd
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
fieldValue: "US"
- fieldKey: MnuPslCd
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
fieldValue: "30301"
- productId: PART-002
productDescription: Sample pharma goods
commodityCode: "300490"
productMetaData:
- groupKey: US-IMP-FDA
fields:
- fieldKey: MnuNa
regulationSections:
- sectionKey: Cos
fieldValue: UPS Labs
- fieldKey: MnuPslCd
regulationSections:
- sectionKey: Cos
fieldValue: "30301"
- fieldKey: MnuAdLn1Te
regulationSections:
- sectionKey: Cos
fieldValue: 55 Glenlake Pkwy NE
- fieldKey: MnuCtyNa
regulationSections:
- sectionKey: Cos
fieldValue: Atlanta
- fieldKey: MnuStPrvCd
regulationSections:
- sectionKey: Cos
fieldValue: GA
- fieldKey: MnuCtyCd
regulationSections:
- sectionKey: Cos
fieldValue: US
responses:
"204":
description: Success
headers:
BkndTransId:
$ref: "#/components/headers/BkndTransId"
TransId:
$ref: "#/components/headers/transId"
transactionSrc:
$ref: "#/components/headers/transactionSrc"
Content-Type:
$ref: "#/components/headers/Content-Type"
"400":
$ref: '#/components/responses/BadRequest'
"401":
$ref: '#/components/responses/Unauthorized'
"422":
$ref: '#/components/responses/UnprocessableEntity'
"500":
$ref: '#/components/responses/ServerError'
get:
summary: Returns required Custom Details
description: This returns an array of fields that are required for the provided import and/or export country
parameters:
- $ref: "#/components/parameters/transId"
- $ref: "#/components/parameters/transactionSrc"
- $ref: "#/components/parameters/Content-Type"
- name: import_country_code
in: query
required: false
schema:
type:
- string
- "null"
description: |
The <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank">ISO 3166</a> country or territory code
from where the shipment is being imported to. If this is omitted then all import fields for all countries will be returned
minLength: 2
maxLength: 2
pattern: ^[A-Z]{2}$
example: US
- name: export_country_code
in: query
required: false
schema:
type:
- string
- "null"
description: |
The <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank">ISO 3166</a> country or territory code
from where the shipment is being exported from. If this is omitted then all export fields for all countries will be returned
minLength: 2
maxLength: 2
pattern: ^[A-Z]{2}$
example: IT
- name: locale
in: query
required: false
schema:
type: string
description: ""
minLength: 5
maxLength: 5
pattern: ^[a-z]{2}-[A-Z]{2}$
default: en-US
example: en-US
- name: commodity_codes
in: query
required: false
description: comma-separated list of tariff code for the product for the selected import country and process type to filter results.
schema:
type:
- string
- "null"
minLength: 1
maxLength: 2000
example: "2926400000,3003395000"
- name: version
in: path
description: version
required: true
schema:
type: string
default: v2
enum:
- v2
operationId: getCustomDetailData
security:
- OAuth2: []
tags:
- Customs Detail
responses:
"200":
description: Success
headers:
BkndTransId:
$ref: "#/components/headers/BkndTransId"
TransId:
$ref: "#/components/headers/transId"
transactionSrc:
$ref: "#/components/headers/transactionSrc"
Content-Type:
$ref: "#/components/headers/Content-Type"
content:
application/json:
schema:
$ref: "#/components/schemas/CustomDetailsGetFieldsSuccessResponsev2"
example:
commodityCodes:
- commodityCode: "2926400000"
regulations:
- regulation: FDA
regulationSections:
- sectionKey: DRU
- commodityCode: "3003395000"
regulations:
- regulation: FDA
regulationSections:
- sectionKey: DRU
fieldGroups:
- countryCode: US
countryName: UNITED STATES OF AMERICA
shipmentType: Import
groupKey: US-IMP-FDA
details: This is for US import FDA fields
regulation: FDA
regulationSections:
- sectionKey: Cos
sectionName: Cosmetics
- sectionKey: Bio
sectionName: Biologics
- sectionKey: Dev
sectionName: Device
- sectionKey: Foo
sectionName: Food
fields:
- sectionKey: MnuNa
label: Manufacturer Name
order: "1"
tooltip: Type of shipping bill to be processed for the shipment
isRequired: C
requirementConditions:
- fieldKey: MnuPslCd
operator: "!="
value: ""
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerName
level: Product
- sectionKey: MnuPslCd
label: Manufacturer Postal Code
order: "8"
tooltip: The postal code address of the manufacturer for the product
isRequired: Y
requirementConditions: null
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerPostalCode
level: Product
- sectionKey: MnuAdLn1Te
label: Manufacturer Address Line 1
order: "1"
tooltip: Line 1 of the address of the manufacturer for the product
isRequired: N
requirementConditions: null
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerAddressLine1
level: Product
- sectionKey: MnuAdLn2Te
label: Manufacturer Address Line 2
order: "1"
tooltip: Line 2 of the address of the manufacturer for the product
isRequired: N
requirementConditions: null
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerAddressLine2
level: Product
- sectionKey: MnuAdLn3Te
label: Manufacturer Address Line 3
order: "1"
tooltip: Line 3 of the address of the manufacturer for the product
isRequired: N
requirementConditions: null
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerAddressLine3
level: Product
- sectionKey: MnuCtyNa
label: Manufacturer City Name
order: "1"
tooltip: Line 3 of the address of the manufacturer for the product
isRequired: N
requirementConditions: null
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerAddressLine3
level: Product
- sectionKey: MnuStPrvCd
label: Manufacturer State/Province Code
order: "1"
tooltip: The state/province for the address of the manufacturer for the product
isRequired: N
requirementConditions: null
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerStateProvinceCode
level: Product
- sectionKey: MnuCtyCd
label: Manufacturer Country Code
order: "1"
tooltip: The country code for the address of the manufacturer for the product
isRequired: N
requirementConditions: null
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerCountryCode
level: Product
- sectionKey: MnuPslCd
label: Manufacturer Postal Code
order: "1"
tooltip: The postal code address of the manufacturer for the product
isRequired: Y
requirementConditions: null
fieldType: textbox
allowedValueCount: 1
validation:
minLength: null
maxLength: null
errorMessage: Enter a valid value
dataType: Text
regexPattern: null
listValues: []
regulationSections:
- sectionKey: Cos
- sectionKey: Bio
- sectionKey: Dev
- sectionKey: Foo
keyAlias: ManufacturerPostalCode
level: Product
"401":
$ref: '#/components/responses/Unauthorized'
"422":
$ref: '#/components/responses/UnprocessableEntity'
"500":
$ref: '#/components/responses/ServerError'
components:
securitySchemes:
oauth2:
type: oauth2
description: |
Find your Client ID and Secret on your app info page.
1. Select "Try It"
2. In the Security section enter your Client ID and Secret
3. Select "Request Token"
4. Enter any additional information in the Body and Parameters sections
5. Select "Send" to execute your API request"
flows:
clientCredentials:
x-tokenEndpointAuthMethod: client_secret_basic
tokenUrl: https://onlinetools.ups.com/security/v2/oauth/token
scopes: {}
oauthCie:
type: oauth2
description: |
Find your Client ID and Secret on your app info page.
1. Select "Try It"
2. In the Security section enter your Client ID and Secret
3. Select "Request Token"
4. Enter any additional information in the Body and Parameters sections
5. Select "Send" to execute your API request"
flows:
clientCredentials:
x-tokenEndpointAuthMethod: client_secret_basic
tokenUrl: https://wwwcie.ups.com/security/v2/oauth/token
scopes: {}
JWTAuth:
type: "http"
scheme: bearer
bearerFormat: JWT
parameters:
transId:
name: transId
in: header
required: true
schema:
type: string
description: Transaction Id
transactionSrc:
name: transactionSrc
in: header
required: true
schema:
type: string
description: Identifies the clients/source application that is calling
Content-Type:
name: Content-Type
in: header
required: true
schema:
type: string
description: accepted value application/json
headers:
BkndTransId:
description: The backend transaction id.
schema:
type: string
example: 383f7d397a48
transId:
description: An identifier unique to the request.
schema:
type: string
pattern: ^[a-zA-Z0-9-.]+$
maxLength: 512
example: 0a1b9c2d8e3f7g4h6i5
transactionSrc:
description: Identifies the client/source application that is calling.
schema:
type: string
pattern: ^[a-zA-Z0-9-.]+$
maxLength: 512
example: UPS.com
Content-Type:
description: The Content-Type header provides the client with the actual content/media type of the returned content.
schema:
type: string
example: application/json
APIErrorCode:
description: The API error code.
schema:
type: string
example: UJ0001
APIErrorMsg:
description: The API error message.
schema:
type: string
example: Invalid token or token is not present.
responses:
BadRequest:
description: Bad Request
headers:
BkndTransId:
$ref: "#/components/headers/BkndTransId"
transId:
$ref: "#/components/headers/transId"
transactionSrc:
$ref: "#/components/headers/transactionSrc"
Content-Type:
$ref: "#/components/headers/Content-Type"
APIErrorCode:
$ref: "#/components/headers/APIErrorCode"
APIErrorMessage:
$ref: "#/components/headers/APIErrorMsg"
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDetailsErrorResponsev2'
example:
response:
errors:
- code: "105.000"
message: Malformed JSON request
- code: "105.004"
message: Field value is required
description: "VALUE_REQUIRED"
field: "shipperNumber"
value: null
Unauthorized:
description: Unauthorized
headers:
BkndTransId:
$ref: "#/components/headers/BkndTransId"
transId:
$ref: "#/components/headers/transId"
transactionSrc:
$ref: "#/components/headers/transactionSrc"
Content-Type:
$ref: "#/components/headers/Content-Type"
APIErrorCode:
$ref: "#/components/headers/APIErrorCode"
APIErrorMessage:
$ref: "#/components/headers/APIErrorMsg"
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDetailsErrorResponsev2'
example:
response:
errors:
- code: "105.401"
message: Invalid token or token is not present
description: null
field: null
value: null
UnprocessableEntity:
description: Unprocessable Entity
headers:
BkndTransId:
$ref: "#/components/headers/BkndTransId"
transId:
$ref: "#/components/headers/transId"
transactionSrc:
$ref: "#/components/headers/transactionSrc"
Content-Type:
$ref: "#/components/headers/Content-Type"
APIErrorCode:
$ref: "#/components/headers/APIErrorCode"
APIErrorMessage:
$ref: "#/components/headers/APIErrorMsg"
content:
application/json:
schema:
$ref: "#/components/schemas/CustomDetailsErrorResponsev2"
example:
response:
errors:
- code: "105.001"
description: INVALID_FIELD_VALUE
field: importCountryCode
message: Supplied value was not in the correct range of valid values.
value: USA
ServerError:
description: Server Error
headers:
BkndTransId:
$ref: "#/components/headers/BkndTransId"
transId:
$ref: "#/components/headers/transId"
transactionSrc:
$ref: "#/components/headers/transactionSrc"
Content-Type:
$ref: "#/components/headers/Content-Type"
APIErrorCode:
$ref: "#/components/headers/APIErrorCode"
APIErrorMessage:
$ref: "#/components/headers/APIErrorMsg"
content:
application/json:
schema:
$ref: '#/components/schemas/CustomDetailsErrorResponsev2'
example:
response:
errors:
- code: "105.500"
message: Internal Server Error
description: INTERNAL_ERROR
field: null
value: null
schemas:
#/content/fields/customs-detail
CustomDetailsPostFieldsRequestv2:
type: object
description: Container for the posting of field data
properties:
shipperNumber:
type: string
description: This represents the shipper account number. Required when actionType is save.
minLength: 6
maxLength: 6
example: X5R660
actionType:
type: string
description: Specify the intent of the request. 'Save' will inherently perform validation.
enum:
- validate
- save
trackingNumber:
type: string
description: The lead 1Z number for the shipment. Required when actionType is save.
minLength: 18
maxLength: 18
pattern: ^1Z[0-9A-Z]{16}$
example: 1Z1234567891234560
shipmentMetaData:
$ref: '#/components/schemas/CustomDetailsRequestMetaDatav2'
products:
type: array
description: Unbounded list of containers for products included on the shipment being updated
minItems: 1
items:
type: object
properties:
productId:
type: string
description: An identifier for the product
minLength: 1
maxLength: 50
example: PROD-001
productDescription:
type: string
description: The description of the product
minLength: 1
maxLength: 105
example: Sample pharma goods
commodityCode:
$ref: '#/components/schemas/CustomDetailsCommodityCodev2'
productMetaData:
$ref: '#/components/schemas/CustomDetailsRequestMetaDatav2'
additionalProperties: false
required:
- productId
- productDescription
- productMetaData
additionalProperties: false
required:
- actionType
CustomDetailsGetFieldsSuccessResponsev2:
type: object
description: Contains commodity code groupings and the detailed field metadata required per country, process, and Regulation.
properties:
commodityCodes:
type: array
description: Unbounded list of commodity codes and their associated compliance Regulations.
items:
type: object
properties:
commodityCode:
$ref: '#/components/schemas/CustomDetailsCommodityCodev2'
regulations:
type: array
description: Regulations that require additional data for this commodity code.
minItems: 1
items:
type: object
properties:
regulation:
$ref: '#/components/schemas/CustomDetailsRegulationv2'
regulationSections:
$ref: '#/components/schemas/CustomDetailsRegulationSectionv2'
additionalProperties: false
required:
- regulation
additionalProperties: false
required:
- commodityCode
- regulations
fieldGroups:
type: array
description: Unbounded list of field group definitions grouped by country, shipment type, and Regulation.
minItems: 1
items:
type: object
properties:
countryCode:
type: string
description: The <a href="https://www.iso.org/iso-3166-country-codes.html" target="_blank">ISO 3166</a> country or territory code the fields pertain to.
minLength: 2
maxLength: 2
pattern: ^[A-Z]{2}$
example: US
countryName:
type: string
description: Country name the fields apply to.
example: UNITED STATES OF AMERICA
shipmentType:
type: string
description: Indicates what direction of movement the fields pertain to.
oneOf:
- title: Fields for import movment
const: Import
- title: Fields for export movement
const: Export
- title: Fields for both movements
const: Both
groupKey:
$ref: '#/components/schemas/CustomDetailsGroupKeyv2'
details:
type: string
description: Provides details on why and when the information is needed.
example: This is for US import FDA fields
regulation:
$ref: '#/components/schemas/CustomDetailsRegulationv2'
regulationSections:
$ref: '#/components/schemas/CustomDetailsRegulationSectionv2'
fields:
type: array
description: Unbounded list of individual field definitions.
minItems: 1
items:
type: object
properties:
sectionKey:
$ref: '#/components/schemas/CustomDetailsSectionKeyv2'
label:
type: string
description: Human-readable name of the field.
example: Manufacturer Name
order:
type: string
description: Display order for the field.
minLength: 1
maxLength: 3
example: "1"
tooltip:
type:
- string
- "null"
description: Tooltip text explaining the field.
example: The name of the manufacturer for the product
isRequired:
type: string
description: Returns the conditionality of the field
oneOf:
- title: "Yes"
const: "Y"
- title: "No"
const: "N"
- title: "Conditional"
description: "If returned there will be at least one requirement condition"
const: "C"
requirementConditions:
type:
- array
- "null"
description: Unbounded array of rules. Conditionally required when is 'isRequired' flag is set.
items:
type: object
description: |
An object containing the specifics of each rule. Order is to be applied
top-down (OR conditions align with the prior rule).
properties:
logicalOperator:
type: string
description: |
Determines how the rules are joined when evaluating the condition if there are multiple rules.
Required for all rules except the first.
enum:
- "AND"
- "OR"
fieldKey:
type:
- string
- "null"
description: The key for the field that this rule is evaluating
example: IN001
operator:
type:
- string
- "null"
description: The operator used when evaluating the rule
oneOf:
- title: Equals
const: "="
- title: Greater Than
const: ">"
- title: Less Than
const: "<"
- title: Not Equal To
const: "!="
value:
type:
- string
- "null"
description: The value used when evaluating the rule
example: CSB V
additionalProperties: false
required:
- fieldKey
- operator
- value
fieldType:
type: string
description: The type of the field, based on available html form inputs
enum:
- textbox
- list
- date
- radio
- checkbox
- textarea
example: textbox
allowedValueCount:
type: integer
description: Number of occurnces allowed for this field
minLength: 1
maxLength: 2
default: 1
example: 1
validation:
type: object
description: rule validation object
properties:
minLength:
type:
- integer
- "null"
description: The min length allowed for text fields
minLength: 1
maxLength: 2
minimum: 1
maximum: 99
example: 1
maxLength:
type:
- integer
- "null"
description: The max length allowed for text fields
minLength: 1
maxLength: 3
minimum: 1
maximum: 100
example: 10
errorMessage:
type:
- string
- "null"
description: Error Message
example: Enter a valid alpha numeric value.
dataType:
type: string
description: defines which type of values to look for
oneOf:
- title: Custom
description: user will be required to enter a custom regex pattern