tracking_number 1.3.2 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,303 @@
1
+ {
2
+ "name": "FedEx",
3
+ "courier_code": "fedex",
4
+ "tracking_numbers": [
5
+ {
6
+ "name": "FedEx Express (12)",
7
+ "id": "fedex_12",
8
+ "regex": "\\s*(?<SerialNumber>([0-9]\\s*){11})(?<CheckDigit>[0-9]\\s*)",
9
+ "validation": {
10
+ "checksum": {
11
+ "name": "sum_product_with_weightings_and_modulo",
12
+ "weightings": [
13
+ 3,
14
+ 1,
15
+ 7,
16
+ 3,
17
+ 1,
18
+ 7,
19
+ 3,
20
+ 1,
21
+ 7,
22
+ 3,
23
+ 1
24
+ ],
25
+ "modulo1": 11,
26
+ "modulo2": 10
27
+ }
28
+ },
29
+ "tracking_url": "https://www.fedex.com/apps/fedextrack/?tracknumbers=%s",
30
+ "test_numbers": {
31
+ "valid": [
32
+ "986578788855",
33
+ "477179081230",
34
+ "799531274483",
35
+ "790535312317",
36
+ " 7 9 0 5 3 5 3 1 2 3 1 7 ",
37
+ "974367662710"
38
+ ],
39
+ "invalid": [
40
+ "996578788855"
41
+ ]
42
+ }
43
+ },
44
+ {
45
+ "name": "FedEx Express (34)",
46
+ "id": "fedex_34",
47
+ "regex": [
48
+ "\\s*1\\s*0\\s*[0-9]\\s*[0-9]\\s*[0-9]\\s*",
49
+ "([0-9]\\s*){10}",
50
+ "(?<DestinationZip>([0-9]\\s*){5})",
51
+ "(?<SerialNumber>([0-9]\\s*){13})",
52
+ "(?<CheckDigit>[0-9]\\s*)"
53
+ ],
54
+ "validation": {
55
+ "checksum": {
56
+ "name": "sum_product_with_weightings_and_modulo",
57
+ "weightings": [
58
+ 1,
59
+ 7,
60
+ 3,
61
+ 1,
62
+ 7,
63
+ 3,
64
+ 1,
65
+ 7,
66
+ 3,
67
+ 1,
68
+ 7,
69
+ 3,
70
+ 1
71
+ ],
72
+ "modulo1": 11,
73
+ "modulo2": 10
74
+ }
75
+ },
76
+ "tracking_url": "https://www.fedex.com/apps/fedextrack/?tracknumbers=%s",
77
+ "test_numbers": {
78
+ "valid": [
79
+ "1001921334250001000300779017972697",
80
+ "1001921380360001000300639585804382",
81
+ "1001901781990001000300617767839437",
82
+ " 1 0 0 1 9 0 1 7 8 1 9 9 0 0 0 1 0 0 0 3 0 0 6 1 7 7 6 7 8 3 9 4 3 7 ",
83
+ "1002297871540001000300790695517286",
84
+ "1027590111820004833500785458233610"
85
+ ],
86
+ "invalid": [
87
+ "1001901781990001000300617767839438"
88
+ ]
89
+ }
90
+ },
91
+ {
92
+ "name": "FedEx SmartPost",
93
+ "id": "fedex_smartpost",
94
+ "description": "Shipped by FedEx, Delivered by USPS",
95
+ "regex": [
96
+ "\\s*(?:",
97
+ "(?:(?<RoutingApplicationId>4\\s*2\\s*0\\s*)(?<DestinationZip>([0-9]\\s*){5}))?",
98
+ "(?<ApplicationIdentifier>9\\s*2\\s*)",
99
+ ")?",
100
+ "(?<SerialNumber>",
101
+ "(?<SCNC>([0-9]\\s*){2})",
102
+ "(?<ServiceType>([0-9]\\s*){2})",
103
+ "(?<ShipperId>([0-9]\\s*){8})",
104
+ "(?<PackageId>([0-9]\\s*){11}|([0-9]\\s*){7})",
105
+ ")",
106
+ "(?<CheckDigit>([0-9]\\s*))"
107
+ ],
108
+ "additional": [
109
+ {
110
+ "name": "Service Type",
111
+ "regex_group_name": "ServiceType",
112
+ "lookup": [
113
+ {
114
+ "matches_regex": ".",
115
+ "name": "Delivered by USPS"
116
+ }
117
+ ]
118
+ }
119
+ ],
120
+ "partners": [{
121
+ "partner_id": "usps_91",
122
+ "partner_type": "carrier",
123
+ "description": "FedEx SmartPost is a shipping service that utilizes FedEx for the initial transport and the United States Postal Service for final delivery."
124
+ }],
125
+ "validation": {
126
+ "checksum": {
127
+ "name": "mod10",
128
+ "evens_multiplier": 3,
129
+ "odds_multiplier": 1
130
+ },
131
+ "serial_number_format": {
132
+ "prepend_if": {
133
+ "matches_regex": "^(?!92).+",
134
+ "content": "92"
135
+ }
136
+ }
137
+ },
138
+ "tracking_url": "https://www.fedex.com/apps/fedextrack/?tracknumbers=%s",
139
+ "test_numbers": {
140
+ "valid": [
141
+ "61299998820821171811",
142
+ "9261292700768711948021",
143
+ "420 11213 92 6129098349792366623 8",
144
+ "92 6129098349792366623 8",
145
+ "6129098349792366623 8"
146
+ ],
147
+ "invalid": [
148
+ "9261292700768711948020",
149
+ "420 11213 6129098349792366623 8",
150
+ "420 92 6129098349792366623 8",
151
+ "11213 92 6129098349792366623 8"
152
+ ]
153
+ }
154
+ },
155
+ {
156
+ "name": "FedEx Ground",
157
+ "id": "fedex_ground",
158
+ "regex": "\\s*(?<SerialNumber>([0-9]\\s*){14})(?<CheckDigit>([0-9]\\s*))",
159
+ "validation": {
160
+ "checksum": {
161
+ "name": "mod10",
162
+ "evens_multiplier": 1,
163
+ "odds_multiplier": 3
164
+ }
165
+ },
166
+ "tracking_url": "https://www.fedex.com/apps/fedextrack/?tracknumbers=%s",
167
+ "test_numbers": {
168
+ "valid": [
169
+ "0414 4176 0228 964",
170
+ "5682 8361 0012 000",
171
+ " 5 6 8 2 8 3 6 1 0 0 1 2 0 0 0 ",
172
+ "5682 8361 0012 734"
173
+ ],
174
+ "invalid": [
175
+ "5682 8361 0012 732"
176
+ ]
177
+ }
178
+ },
179
+ {
180
+ "name": "FedEx Ground (SSCC-18)",
181
+ "id": "fedex_ground_sscc_18",
182
+ "regex": "\\s*(?<ShippingContainerType>([0-9]\\s*){2})(?<SerialNumber>([0-9]\\s*){15})(?<CheckDigit>[0-9]\\s*)",
183
+ "tracking_url": "https://www.fedex.com/apps/fedextrack/?tracknumbers=%s",
184
+ "validation": {
185
+ "checksum": {
186
+ "name": "mod10",
187
+ "evens_multiplier": 3,
188
+ "odds_multiplier": 1
189
+ }
190
+ },
191
+ "test_numbers": {
192
+ "valid": [
193
+ "00 0123 4500 0000 0027",
194
+ " 0 0 0 1 2 3 4 5 0 0 0 0 0 0 0 0 2 7 "
195
+ ],
196
+ "invalid": [
197
+ "000000000000000001"
198
+ ]
199
+ },
200
+ "additional": [
201
+ {
202
+ "name": "Container Type",
203
+ "regex_group_name": "ShippingContainerType",
204
+ "lookup": [
205
+ {
206
+ "matches": "00",
207
+ "name": "case/carton"
208
+ },
209
+ {
210
+ "matches": "01",
211
+ "name": "pallet"
212
+ },
213
+ {
214
+ "matches": "02",
215
+ "name": "larger than a pallet"
216
+ },
217
+ {
218
+ "matches": "04",
219
+ "name": "internally defined for intra-company use"
220
+ }
221
+ ]
222
+ }
223
+ ]
224
+ },
225
+ {
226
+ "name": "FedEx Ground 96 (22)",
227
+ "id": "fedex_ground_96",
228
+ "regex": [
229
+ "\\s*(?<ApplicationIdentifier>9\\s*6\\s*)",
230
+ "(?<SCNC>([0-9]\\s*){2})",
231
+ "(?<ServiceType>([0-9]\\s*){3})",
232
+ "(?<SerialNumber>(?<ShipperId>([0-9]\\s*){7})(?<PackageId>([0-9]\\s*){7}))",
233
+ "(?<CheckDigit>[0-9]\\s*)"
234
+ ],
235
+ "validation": {
236
+ "checksum": {
237
+ "name": "mod10",
238
+ "evens_multiplier": 1,
239
+ "odds_multiplier": 3
240
+ }
241
+ },
242
+ "tracking_url": "https://www.fedex.com/apps/fedextrack/?tracknumbers=%s",
243
+ "test_numbers": {
244
+ "valid": [
245
+ "9611020987654312345672",
246
+ " 9 6 1 1 0 2 0 9 8 7 6 5 4 3 1 2 3 4 5 6 7 2 "
247
+ ],
248
+ "invalid": [
249
+ "9600000000000000000001"
250
+ ]
251
+ }
252
+ },
253
+ {
254
+ "name": "FedEx Ground GSN",
255
+ "id": "fedex_ground_gsn",
256
+ "regex": [
257
+ "\\s*(?<ApplicationIdentifier>9\\s*6\\s*)",
258
+ "(?<SCNC>([0-9]\\s*){2})",
259
+ "([0-9]\\s*){5}",
260
+ "(?<GSN>([0-9]\\s*){10})",
261
+ "[0-9]\\s*",
262
+ "(?<SerialNumber>([0-9]\\s*){13})",
263
+ "(?<CheckDigit>[0-9]\\s*)"
264
+ ],
265
+ "validation": {
266
+ "checksum": {
267
+ "name": "sum_product_with_weightings_and_modulo",
268
+ "weightings": [
269
+ 1,
270
+ 7,
271
+ 3,
272
+ 1,
273
+ 7,
274
+ 3,
275
+ 1,
276
+ 7,
277
+ 3,
278
+ 1,
279
+ 7,
280
+ 3,
281
+ 1
282
+ ],
283
+ "modulo1": 11,
284
+ "modulo2": 10
285
+ }
286
+ },
287
+ "tracking_url": "https://www.fedex.com/apps/fedextrack/?tracknumbers=%s",
288
+ "test_numbers": {
289
+ "valid": [
290
+ "9622001900000000000000776632517510",
291
+ "9622001560000000000000794808390594",
292
+ "9622001560001234567100794808390594",
293
+ " 9 6 2 2 0 0 1 5 6 0 0 0 1 2 3 4 5 6 7 1 0 0 7 9 4 8 0 8 3 9 0 5 9 4 ",
294
+ "9632001560123456789900794808390594"
295
+ ],
296
+ "invalid": [
297
+ "9622001560001234567100794808390595",
298
+ "9622001560001234567100794808390597"
299
+ ]
300
+ }
301
+ }
302
+ ]
303
+ }
@@ -0,0 +1,26 @@
1
+ {
2
+ "name": "Landmark Global LTN",
3
+ "courier_code": "landmark",
4
+ "tracking_numbers": [
5
+ {
6
+ "name": "Landmark Global LTN",
7
+ "id": "landmark_global",
8
+ "regex": [
9
+ "\\s*L\\s*T\\s*N\\s*(?<SerialNumber>([0-9]\\s*){8})\\s*N\\s*1"
10
+ ],
11
+ "tracking_url": "https://track.landmarkglobal.com/?search=%s",
12
+ "validation": {},
13
+ "test_numbers": {
14
+ "valid": [
15
+ "LTN74207623N1",
16
+ "LTN74209518N1",
17
+ "LTN74224021N1"
18
+ ],
19
+ "invalid": [
20
+ "LSN74209518N2",
21
+ "LSN74209518N1"
22
+ ]
23
+ }
24
+ }
25
+ ]
26
+ }
@@ -0,0 +1,84 @@
1
+ {
2
+ "name": "LaserShip",
3
+ "courier_code": "lasership",
4
+ "tracking_numbers": [
5
+ {
6
+ "name": "LaserShip LX",
7
+ "id": "lasership_lx",
8
+ "regex": [
9
+ "\\s*L\\s*[AIEHNX]\\s*[1-3]\\s*(?<SerialNumber>([0-9]\\s*){7,7})\\s*"
10
+ ],
11
+ "validation": {},
12
+ "test_numbers": {
13
+ "valid": [
14
+ "LX17635036",
15
+ "LX 176 35035",
16
+ "LX17635034",
17
+ "LI 129 79072",
18
+ "LI12976442",
19
+ "LA28376237",
20
+ "LA28372694",
21
+ "LH13830790",
22
+ "LH13816137",
23
+ "LH13820469",
24
+ "LH13831034",
25
+ "LH13821737",
26
+ "LH13820881",
27
+ "LH13820881",
28
+ "LH13812209",
29
+ "LH13800911",
30
+ "LH13795254",
31
+ "LE10917377",
32
+ "LE10913900",
33
+ "LE10913753",
34
+ "LN30083672"
35
+ ],
36
+ "invalid": [
37
+ "LX9763503N",
38
+ "LH9176350N6",
39
+ "XA17635036",
40
+ "L A 9 7 6 3 5 0 3 6 "
41
+ ]
42
+ }
43
+ },
44
+ {
45
+ "name": "LaserShip 1LS7 (15)",
46
+ "id": "lasership_1ls7",
47
+ "regex": [
48
+ "\\s*1\\s*L\\s*S\\s*7\\s*[12]\\s*([0-9]\\s*){4,4}",
49
+ "(?<SerialNumber>([0-9]\\s*){6,6})\\s*"
50
+ ],
51
+ "validation": {},
52
+ "test_numbers": {
53
+ "valid": [
54
+ "1LS717793482164",
55
+ "1LS724505321754",
56
+ "1LS720000000000",
57
+ " 1 L S 7 2 0 0 0 0 0 0 0 0 0 0 "
58
+ ],
59
+ "invalid": [
60
+ "1LX734505321754"
61
+ ]
62
+ }
63
+ },
64
+ {
65
+ "name": "LaserShip 1LS7 (18)",
66
+ "regex": [
67
+ "\\s*1\\s*L\\s*S\\s*7\\s*",
68
+ "[12]\\s*([0-9]\\s*){2,2}\\s*0\\s*1\\s*[1234]\\s*",
69
+ "\\s*(?<SerialNumber>([0-9]\\s*){6,6})",
70
+ "-\\s*1\\s*"
71
+ ],
72
+ "validation": {},
73
+ "test_numbers": {
74
+ "valid": [
75
+ "1LS7119013618127-1",
76
+ " 1 L S 7 1 1 9 0 1 3 6 1 8 1 2 7 - 1 "
77
+ ],
78
+ "invalid": [
79
+ "1LS7119013618127-2"
80
+ ]
81
+ }
82
+ }
83
+ ]
84
+ }
@@ -0,0 +1,70 @@
1
+ {
2
+ "name": "OnTrac",
3
+ "courier_code": "ontrac",
4
+ "tracking_numbers": [
5
+ {
6
+ "name": "OnTrac",
7
+ "id": "ontrac_c",
8
+ "regex": "\\s*C\\s*(?<SerialNumber>([0-9]\\s*){13})(?<CheckDigit>[0-9]\\s*)",
9
+ "validation": {
10
+ "checksum": {
11
+ "name": "mod10",
12
+ "evens_multiplier": 1,
13
+ "odds_multiplier": 2
14
+ },
15
+ "serial_number_format": {
16
+ "prepend_if": {
17
+ "matches_regex": "^(?!4).+$",
18
+ "content": "4"
19
+ }
20
+ }
21
+ },
22
+ "tracking_url": "http://www.ontrac.com/trackingres.asp?tracking_number=%s",
23
+ "test_numbers": {
24
+ "valid": [
25
+ "C11031500001879",
26
+ "C 110 31 500 00187 9",
27
+ "C10999911320231",
28
+ "C11121552953069",
29
+ "C11121553156000",
30
+ "C11121552829468"
31
+ ],
32
+ "invalid": [
33
+ "C10000000000000",
34
+ "C11031500001889"
35
+ ]
36
+ }
37
+ },
38
+ {
39
+ "name": "OnTrac D",
40
+ "id": "ontrac_d",
41
+ "regex": "\\s*D\\s*(?<SerialNumber>([0-9]\\s*){13})(?<CheckDigit>[0-9]\\s*)",
42
+ "validation": {
43
+ "checksum": {
44
+ "name": "mod10",
45
+ "evens_multiplier": 1,
46
+ "odds_multiplier": 2
47
+ },
48
+ "serial_number_format": {
49
+ "prepend_if": {
50
+ "matches_regex": "^(?!5).+$",
51
+ "content": "5"
52
+ }
53
+ }
54
+ },
55
+ "tracking_url": "http://www.ontrac.com/trackingres.asp?tracking_number=%s",
56
+ "test_numbers": {
57
+ "valid": [
58
+ "D10011354453707",
59
+ "D10011345983010",
60
+ "D 100 113 459 830 10",
61
+ "D10011342332145"
62
+ ],
63
+ "invalid": [
64
+ "D10011345983012",
65
+ "D10011342332144"
66
+ ]
67
+ }
68
+ }
69
+ ]
70
+ }