Skip to content

Commit

Permalink
Add UPS waybill support, #26
Browse files Browse the repository at this point in the history
  • Loading branch information
jkeen committed Nov 3, 2022
1 parent d8c9071 commit 4d29a39
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions couriers/ups.json
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,50 @@
"1Z1111111111111111"
]
}
},
{
"name": "UPS Waybill",
"regex": [
"\\s*(?<ServiceType>([A-Z]\\s*){1})",
"(?<SerialNumber>(?:[A-Z0-9]\\s*){9,9})",
"(?<CheckDigit>[A-Z0-9]\\s*)"
],
"validation": {
"checksum": {
"name": "mod10",
"evens_multiplier": 1,
"odds_multiplier": 2
}
},
"additional": [
{
"name": "Service Type",
"regex_group_name": "ServiceType",
"lookup": [
{
"matches": "J",
"name": "UPS Next Day Express"
},
{
"matches": "K",
"name": "UPS Ground"
}
]
}
],
"tracking_url": "https://wwwapps.ups.com/WebTracking/track?track=yes&trackNums=%s",
"test_numbers": {
"valid": [
"K1506235620",
"K2479825491",
"J4603636537"
],
"invalid": [
"K1506235622",
"K2479825492",
"J4603636538"
]
}
}
]
}

0 comments on commit 4d29a39

Please sign in to comment.