Loading AI tools
Standard for international postal mail tracking numbers From Wikipedia, the free encyclopedia
The UPU S10 standard defines a system for assigning 13-character identifiers to international postal items for the purpose of tracking and tracing them during shipping.
With increased liberalization and the possibility of multiple postal services operating in the same country, the use of country codes to designate the postal service is a problem. To solve this, each country has a designated postal service that controls all S10 identifiers from that country; any competing postal services will have to cooperate with the designated owner. The organization assigned by the UPU member country shall manage the issue and use of S10 identifiers, among all the operators under the authority of that UPU member country, in such a way as to ensure that no S10 identifier is reused within a period of 12 calendar months. A period of 24 calendar months, or longer, is recommended.
The identifiers consist of a two-letter service indicator code, an eight-digit serial number (in the range 00000000 to 99999999), a single check-digit, and a two-letter ISO country code identifying the issuing postal administration's country.[1]
S10 format | |||
---|---|---|---|
1 | 2 | 3 | 4 |
AA | 00000000 | 9 | BB |
|
Service codes are generally assigned and administered within each issuing country, but certain types of service and code ranges are used for all countries as listed here.
Code | Interpretation[1] |
---|---|
AA–AU | Unassigned[lower-alpha 1] |
AV–AZ | Domestic, bilateral, multilateral use only[lower-alpha 2] |
BA–BZ | Domestic, bilateral, multilateral use only |
CA–CZ | Parcel post
|
DA–DZ | Domestic, bilateral, multilateral use only |
EA–EZ | EMS
|
FA–FZ | Unassigned[lower-alpha 1] |
GA | Domestic, bilateral, multilateral use only |
GB–GC | Unassigned[lower-alpha 1] |
GD | Domestic, bilateral, multilateral use only |
GE–GZ | Unassigned[lower-alpha 1] |
HA–HZ | E-commerce parcels
|
IA–IZ | Unassigned[lower-alpha 1] |
JA–JZ | Reserved[lower-alpha 4] |
KA–KZ | Reserved[lower-alpha 4] |
LA–LZ | Letter post tracked
|
MA–MZ | Letter post M bags |
NA–NZ | Domestic, bilateral, multilateral use only |
OA–OZ | Unassigned[lower-alpha 1] |
PA–PZ | Domestic, bilateral, multilateral use only |
QA–QM | International Business Reply Service |
QN–QZ | Unassigned[lower-alpha 1] |
RA–RZ | Letter post registered
|
SA–SZ | Reserved[lower-alpha 4] |
TA–TZ | Reserved[lower-alpha 4] |
UA–UZ | Letter post items (when L, M, Q, R and V codes don't apply)[lower-alpha 5]
|
VA–VZ | Letter post insured
|
WA–WZ | Reserved[lower-alpha 4] |
XA–XZ | Unassigned[lower-alpha 1] |
YA–YZ | Unassigned[lower-alpha 1] |
ZA–ZZ | Domestic, bilateral, multilateral use only |
For Python 3.6 or later:
def get_check_digit(num: int) -> int:
"""Get S10 check digit."""
weights = [8, 6, 4, 2, 3, 5, 9, 7]
sum = 0
for i, digit in enumerate(f"{num:08}"):
sum += weights[i] * int(digit)
sum = 11 - (sum % 11)
if sum == 10:
sum = 0
elif sum == 11:
sum = 5
return sum
function getCheckDigit(num) {
const weights = [8, 6, 4, 2, 3, 5, 9, 7];
const numArr = Array.from(String(num), Number);
let sum = 0;
numArr.forEach((n, i) => sum = sum + (n * weights[i]));
sum = 11 - (sum % 11);
if (sum == 10) sum = 0;
else if (sum == 11) sum = 5;
return sum;
}
checkDigit :: [Int] -> Int
checkDigit ns
| c == 11 = 5
| c == 10 = 0
| otherwise = c
where weights = [8, 6, 4, 2, 3, 5, 9, 7]
s = sum $ zipWith (*) weights ns
c = 11 - (s `mod` 11)
Seamless Wikipedia browsing. On steroids.
Every time you click a link to Wikipedia, Wiktionary or Wikiquote in your browser's search results, it will show the modern Wikiwand interface.
Wikiwand extension is a five stars, simple, with minimum permission required to keep your browsing private, safe and transparent.