fbpx
Wikipedia

S10 (UPU standard)

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.

Format

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—the latter identifying the issuing postal administration's country.[1]

S10 format
1 2 3 4
AA 00000000 9 BB
  1. Service indicator code (see below)
  2. Serial number
  3. Check-digit (see below)
  4. ISO 3166-1 alpha-2 country code

Service indicator codes

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[2]
AA–AZ domestic, bilateral, multilateral use only, identifying RFID-tracked e-commerce items
BA–BZ for domestic, bilateral, multilateral use only
CA–CZ Parcel post; the use of CZ requires bilateral agreement. It is not required to use CV for insured parcels but if the service indicator CV is used, then it is recommended that it be used only on insured parcels.
DA–DZ for domestic, bilateral, multilateral use only
EA–EZ EMS; the use of EX–EZ requires bilateral agreement
GA for domestic, bilateral, multilateral use only
GD for domestic, bilateral, multilateral use only
HA–HZ e-commerce parcels; the use of HX–HY requires multilateral agreement; the use of HZ requires bilateral agreement
JA–JZ reserved; cannot be assigned as valid service indicator values
KA–KZ reserved; cannot be assigned as valid service indicator values
LA–LZ Letter post trackable, several subtypes; the use of LZ requires bilateral agreement
MA–MZ Letter post: M bags
NA–NZ for domestic, bilateral, multilateral use only
PA–PZ for domestic, bilateral, multilateral use only
QA–QM Letter post: IBRS (International Business Reply Service)
RA–RZ Letter post: registered, but not insured delivery. The use of RZ requires bilateral agreement.
SA–SZ reserved; cannot be assigned as valid service indicator values
TA–TZ reserved; cannot be assigned as valid service indicator values
UA–UZ Letter post: items other than LA–LZ (Express), MA–MZ (M bags), QA–QM (IBRS), RA–RZ (registered), and VA–VZ (insured).
VA–VZ Letter post insured; the use of VZ requires bilateral agreement
WA–WZ reserved; cannot be assigned as valid service indicator values
ZA–ZZ for domestic, bilateral, multilateral use only

Check-digit calculation

  1. Ignore the Service Indicator Code and Country Code
  2. Assign the weights 8, 6, 4, 2, 3, 5, 9, 7 to the 8 digits, from left to right
  3. Calculate S, the sum of each digit multiplied by its weight.
    • For example, for the number 47312482, S = 4*8 + 7*6 + 3*4 + 1*2 + 2*3 + 4*5 + 8*9 + 2*7 = 200
  4. Calculate the check digit, C, from C = 11 - (S mod 11)
    • If C = 10, change to C = 0
    • If C = 11, change to C = 5
    • For the example 47312482 C = 11 - (200 mod 11) = 11 - 2 = 9.

Python code for check-digit calculation

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 

JavaScript code for check-digit calculation

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; } 

Haskell code for check-digit calculation

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) 

See also

References

  1. ^ "S10 Identification of postal items – 13-character identifier" (PDF). UPU. 2017-10-17. Retrieved 2020-08-21.
  2. ^ http://www.upu.int, Service Indicator Codes 2010-04-20 at the Wayback Machine

External links

  • Draft of S10:


standard, standard, defines, system, assigning, character, identifiers, international, postal, items, purpose, tracking, tracing, them, during, shipping, with, increased, liberalization, possibility, multiple, postal, services, operating, same, country, countr. 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 Contents 1 Format 1 1 Service indicator codes 1 2 Check digit calculation 1 2 1 Python code for check digit calculation 1 2 2 JavaScript code for check digit calculation 1 2 3 Haskell code for check digit calculation 2 See also 3 References 4 External linksFormat EditThe 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 the latter identifying the issuing postal administration s country 1 S10 format1 2 3 4AA 00000000 9 BBService indicator code see below Serial number Check digit see below ISO 3166 1 alpha 2 country codeService indicator codes Edit 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 2 AA AZ domestic bilateral multilateral use only identifying RFID tracked e commerce itemsBA BZ for domestic bilateral multilateral use onlyCA CZ Parcel post the use of CZ requires bilateral agreement It is not required to use CV for insured parcels but if the service indicator CV is used then it is recommended that it be used only on insured parcels DA DZ for domestic bilateral multilateral use onlyEA EZ EMS the use of EX EZ requires bilateral agreementGA for domestic bilateral multilateral use onlyGD for domestic bilateral multilateral use onlyHA HZ e commerce parcels the use of HX HY requires multilateral agreement the use of HZ requires bilateral agreementJA JZ reserved cannot be assigned as valid service indicator valuesKA KZ reserved cannot be assigned as valid service indicator valuesLA LZ Letter post trackable several subtypes the use of LZ requires bilateral agreementMA MZ Letter post M bagsNA NZ for domestic bilateral multilateral use onlyPA PZ for domestic bilateral multilateral use onlyQA QM Letter post IBRS International Business Reply Service RA RZ Letter post registered but not insured delivery The use of RZ requires bilateral agreement SA SZ reserved cannot be assigned as valid service indicator valuesTA TZ reserved cannot be assigned as valid service indicator valuesUA UZ Letter post items other than LA LZ Express MA MZ M bags QA QM IBRS RA RZ registered and VA VZ insured VA VZ Letter post insured the use of VZ requires bilateral agreementWA WZ reserved cannot be assigned as valid service indicator valuesZA ZZ for domestic bilateral multilateral use onlyCheck digit calculation Edit Ignore the Service Indicator Code and Country Code Assign the weights 8 6 4 2 3 5 9 7 to the 8 digits from left to right Calculate S the sum of each digit multiplied by its weight For example for the number 47312482 S 4 8 7 6 3 4 1 2 2 3 4 5 8 9 2 7 200 Calculate the check digit C from C 11 S mod 11 If C 10 change to C 0 If C 11 change to C 5 For the example 47312482 C 11 200 mod 11 11 2 9 Python code for check digit calculation Edit For Python 3 6 or later def get check digit num int gt 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 JavaScript code for check digit calculation Edit 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 gt sum sum n weights i sum 11 sum 11 if sum 10 sum 0 else if sum 11 sum 5 return sum Haskell code for check digit calculation Edit checkDigit Int gt 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 See also EditSerial Shipping Container Code a related standard References Edit S10 Identification of postal items 13 character identifier PDF UPU 2017 10 17 Retrieved 2020 08 21 http www upu int Service Indicator Codes Archived 2010 04 20 at the Wayback MachineExternal links EditDraft of S10 Part A Identifier structures and encoding principles Part B EMS items Part C Special letter products Part D Parcels Part E Domestic bilateral use The UPU service indicator code list list 124 Online validator for S10 tracking numbers This standards or measurement related article is a stub You can help Wikipedia by expanding it vte Retrieved from https en wikipedia org w index php title S10 UPU standard amp oldid 1130933037, wikipedia, wiki, book, books, library,

article

, read, download, free, free download, mp3, video, mp4, 3gp, jpg, jpeg, gif, png, picture, music, song, movie, book, game, games.